October 2017 : Online course in ASP.NET MVC / Core. Conducted by Bipin Joshi. Read more...

ASP.NET Core

12345
Encode HTML, JavaScript, and URL Query Strings In ASP.NET Core
When a web page accepts an input from the end user it can also include malicious data consisting of special characters, HTML tags, JavaScript code and the things like that. As a safety measure you should encode such data before displaying it back on to a page or while passing through URL query strings. To that end ASP.NET Core providers three encoder classes that help you accomplish just that. This article discuses how these classes can be used to encode HTML markup, JavaScript code and URL query strings.
Posted On : 04 Sep 2017
Prevent Cross-Site Request Forgery In ASP.NET Core
If you worked with ASP.NET MVC applications before, you are probably aware of Cross-site request forgery (CSRF / XSRF) attacks. You might have also used anti-forgery token based approach to prevent them. ASP.NET Core uses a similar approach but there are a few differences that you should be aware of. To that end this article briefly discusses the CSRF attack and ASP.NET Core way to prevent them.
Posted On : 28 Aug 2017
Five Things Worth Knowing About ASP.NET Core Tag Helpers
It is quite common for ASP.NET Core applications to rely on the tag helpers to render forms and form fields. So, a view typically contains many tag helpers as well as standard HTML markup. You can improve your development time experience with the tag helpers in variety of ways. This article discusses a few of them.
Posted On : 14 Aug 2017
Four Ways of Handling Multiple Submit Buttons in ASP.NET Core
A common beginner question is - How to handle multiple submit buttons in ASP.NET Core? A few years ago I wrote similar article for ASP.NET MVC. This article is for ASP.NET Core and has minor changes.
Posted On : 07 Aug 2017
Implementing AutoPostBack in ASP.NET Core
Those of you who worked with ASP.NET web forms will recollect that certain server controls such as DropDownList have a property called AutoPostBack. This property when set to true automatically submits the form to the server and raises some server side event. In modern web development people prefer to use Ajax over AutoPostBack but at times AutoPostBack is what you might need. To that end this article shows how AutoPostBack can be implemented in ASP.NET Core applications.
Posted On : 31 Jul 2017
Dealing with Camel Casing in ASP.NET Core Web API
Some time ago I wrote a three part article on creating and consuming Web API in ASP.NET Core. You can read them here - Part 1, Part 2, Part 3. If you worked with that example you must have noticed that while serializing data to the client, the ASP.NET Core Web API uses camel casing.
Posted On : 27 Jun 2017
Understanding Routing in ASP.NET Core MVC
In ASP.NET Core MVC, a request URL is mapped to a controller's action. This mapping happens through the routing middleware and you can do good amount of customization. There are two ways of adding routing information to your application: conventional routing and attribute routing. This article introduces you with both of these approaches with the help of an example.
Posted On : 13 Jun 2017
7 Things to Know About SQL Server Distributed Caching in ASP.NET Core
In an article I wrote some time ago, I explained the essentials of in-memory caching in ASP.NET Core. Although in-memory caching serves its purpose in many small applications, at times you need distributed cache rather than local in-memory cache. Consider a situation where a web farm is serving the requests. In this case you can't guarantee that the server storing the cache will serve all the requests. You may also want your cache to survive application restarts.
Posted On : 06 Jun 2017
Creating a Web API in ASP.NET Core
RESTful services are quite common and popular these days. If you ever developed modern service-based applications using ASP.NET Web Forms and ASP.NET MVC, chances are you used a Web API to create REST services. No wonder ASP.NET Core also allows you to create a Web API. This article discusses how a Web API service can be created in ASP.NET Core. It then shows how the created service can be invoked from JavaScript code.
Posted On : 15 May 2017
10 things to know about in-memory caching in ASP.NET Core
The primary purpose of any caching mechanism is to improve performance of an application. As an ASP.NET developer you are probably aware that ASP.NET web forms as well as ASP.NET MVC could used Cache object to cache application data. This was often called server side data caching and was available as an inbuilt feature of the framework. Although ASP.NET Core doesn't have Cache object as such, you can implement in-memory caching quite easily. This article shows you how.
Posted On : 02 May 2017
12345