February 2018 : Instructor-led Online Course in ASP.NET Core 2.0. Conducted by Bipin Joshi. Read more...

ASP.NET Core

12345
Use Razor Pages, MVC, and Web API in a Single ASP.NET Core Application
If you are worked with ASP.NET Core 2.0 before you are probably aware that Visual Studio 2017 offers three basic project templates for creating ASP.NET Core 2.0 projects. They are Web Application (Razor Pages), Web Application (MVC), and Web API (see below). Interestingly Web Application project defaults to Razor Pages. It is important for the beginners to be aware that although these are three different project templates, you can have all these development options - Razor Pages, MVC, and Web API - inside a single ASP.NET Core web application.
Posted On : 15 Jan 2018
Handling Multiple Submit Buttons in Razor Pages
Razor Pages in ASP.NET Core allow you to build page focused web applications using simple page based programming model. If you worked with Razor Pages before you are probably aware that by default you can handle requests using methods such as OnGet(), OnPost(), OnPut(), and OnDelete(). This means a form POSTed to the server needs to be handled using only one action - OnPost(). At times, however, you need to have multiple actions to deal with the same HTTP verb. A common scenario is when you have multiple submit buttons on a form.
Posted On : 08 Jan 2018
Use Cookies and Session To Store TempData In ASP.NET Core
If you ever used TempData in ASP.NET MVC, you are probably aware that by default TempData is stored in Session state. This means the web application must have sessions enabled. Luckily, ASP.NET Core 2.0 provides two TempData providers - Cookie based and Session State based. To that end this article shows how to use both of them in an ASP.NET Core application.
Posted On : 01 Jan 2018
Support Multiple Versions of ASP.NET Core Web API
Now a days REST APIs are quite commonly used in web applications. At times you may need to provide multiple versions of your API to the clients. This could be because of enhanced functionality exposed by the API or it could for the sake of offering multiple sets of functionality (basic, advanced, free, paid etc.). This article discusses a few approaches for offering such multiple versions of your API to the client applications.
Posted On : 18 Dec 2017
Use BindProperty Attribute for Model Binding to Properties
Model binding allows you map request parameters to actions. This means action methods will have one or more parameters and those parameters will receive their values from the model binding framework. Model binding can be performed to simple types as well as complex types. In ASP.NET Core 2.0 you can perform model binding to properties in addition to action parameters. This article explains how.
Posted On : 04 Dec 2017
Seed Users and Roles Data in ASP.NET Core Identity
ASP.NET Core identity allows you to implement authentication and authorization for your web applications. While working with ASP.NET Core Identity at times you need to create default user accounts and roles in the system. In ASP.NET MVC you could have easily done this in Global.asax and Application_Start event handler. In ASP.NET Core the process is bit different since the application startup process is different. To that end this article explains a way to seed such user and roles data in your applications.
Posted On : 27 Nov 2017
Drag-n-Drop File Upload in ASP.NET Core
In one of my earlier articles I discussed how to upload files using full page post-back as well as Ajax post-back. Usually developers use the file input field to select one or more files to be uploaded from the client machine. However, you can also HTML5 drag-n-drop to make it easy for the end user to pick files directly from Windows explorer. To that end this article shows how to implement just that.
Posted On : 20 Nov 2017
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
12345