
Image from Pexels
Tagged articles - ASP.NET
Found 89 articles tagged with ASP.NET
13
Jun
2014
Request different data type from Web API with JQuery
JavaScript31 titlesXML/JSON in return result of Web API REST service method with JQuery
0
In my previous article Different data type in Web API response of the same method I described how to get different response with HttpWebRequest in C#. Here I will demonstrate how to achieve the same thing but in JQuery client side code...read more
12
Jun
2014
Different data type in Web API response of the same method
.NET229 titlesBoth XML and JSON in return result of Web API REST service method
0
Web API restful services are very flexible and they return different data format (JSON or XML) depending on accept type header value from your browser (or other client). However this is not always so precise so sometime you have to force return type...read more
10
Jun
2014
Aggregating RSS feeds from Umbraco content
Umbraco CMS25 titlesServing Umbraco website content in RSS format
0
RSS stands for Really Simple Syndication. It's an easy way for you to keep up with news and information that's important to you, and helps you avoid the conventional methods of browsing or searching for information on websites.
Umbraco stores it's published content in XML format, so exposing website data is really easy...read more
07
Jun
2014
Generating HTML string in C#
.NET229 titlesThe proper way to generate html string in C#
0
From time to time you get to the point where you have to generate some HTML in C# code.
Of course, the easier way is to concatenate string and return that as a result of a method. This is not the most elegant solution and it is only fine for some short string.
...read more
06
Jun
2014
Serving embedded resources through WebAPI in Umbraco
Umbraco CMS25 titlesMake package deployment easy with single file deployment
0
Recently I've deploying GoogleMap Editor package to Umbraco community.
During development I realized that package will have to include script, some html templates, images... I had no problem with that but when it came to actual package build I realized that I will have to deal with bunch of files and even during development, so se some changes which were not dll related I had to restart app by touching web.config.
...read more
28
May
2014
Enumerable Tips & Tricks with String and Int
.NET229 titlesUseful things to do with Enumerable in a single line
0
System.Linq.Enumerable is a core of LINQ magic.
Most of the functions we use in a daily basis for anything we write with sequence, but what is really interesting is that methods from this class can be used for some tricky operations on strings and numbers and make them one line instead of loops.
...read more
27
May
2014
Forcing accept type for WebApi call
.NET229 titlesSetting accept type on the server side for the WebApi request
0
One of the coolest things of WebApi is that adapts to accept type sent in request header. This header value depends on a client.
Based on this WebApi will serve different formats of data (XML/JSON).
...read more
27
May
2014
Extending WebForms Page class for registering stylesheet include
.NET229 titlesExtension method which enables registering stylesheet file reference
0
I recently started working on an Umbraco package for GoogleMap manipulation. Since initial version of package is planned only for Umbraco 6 I decided to use WebuserControl for creating a package custom datatype.
It means that for one document type I might have multiple control instances on the page.
...read more
22
May
2014
Exposing richtext property from content in Umbraco Web Api
Umbraco CMS25 titlesProblem when exposing richtext property from Umbraco through Web Api
0
Almost every content page in your website will have one richtext property for adding rich content for the page.
This allows you to add Macros so you can render dynamic content inside page content at custom places in the page itself.
...read more
28
Apr
2014
Detecting request from mobile device
.NET229 titlesTake control over what is and what is not mobile device for your web app
0
Microsoft made is easy to detect whether request to your web application is coming from mobile device or not by adding a property to Request class. Usage of this is Request.Browser.IsMobileDevice.
This works pretty fine for most of mobile devices, but this property is based on list of mobile browsers which is configured in .NET framework itself.
...read more
23
Apr
2014
Simple configuration class
.NET229 titlesAdding configuration without having to restart app pool
0
Very often you need to store some settings in your configuration. Web.config files are designed for that but there are two things I found very annoying:
...read more
05
Mar
2014
Easy data visualization with Google Graphs API
.NET229 titlesFree and easy way to display data on website
0
Google graph are really easy to use on website for the main reason that you do not need to maintain code and because it is free for use. Samples and documentation can be found at https://developers.google.com/chart/...read more
05
Mar
2014
Handling ajax request in WebForms
.NET229 titlesElegant way to do AJAX in WebForms
0
In case you want to add JQuery Ajax calls to your page, you would basically need to add one more page which will be invoked with Ajax call. In order to reduce number of physical pages you can reuse the same page, but make it act differently for normal GET/POST HTTP request and totally different for Ajax GET/POST HTTP request...read more
05
Mar
2014
Detect ajax request in C#
.NET229 titlesEasier way to detect whether request is an ajax request
0
Sometime you need to determine whether your request is standard GET/POST request or Ajax POST/GET http request.
This info is stored in request value isAjax or X-Requested-With. By checking these values of request you can easily determine whether http request is ajax or not.
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action