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

ASP.NET MVC

12345678910...Last
Convert XML data to JSON and return it from Web API
Recently I stumbled upon a situation where a large number of XML documents needed to be returned from ASP.NET Web API. This sounds like a straightforward task but there was a small twist to the story. The XML documents existed as physical disk files. The Web API should read these files and convert the XML data into JSON. This was needed because the client applications were designed to handle only JSON format. Here I discuss a quick way to accomplish this task.
Posted On : 13 Nov 2017
Accept / Reject File Upload Depending Upon XML Schema Validation
Recently I came across such an application where the end users are required to upload XML files from their machine onto the server. Uploading the file is a quite straightforward thing but in this case it was also required to validate these uploaded files against an XML schema (XSD).
Posted On : 07 Nov 2017
Integrate reCaptcha V2 in ASP.NET Applications (Web Forms / MVC / Core)
If you are running any website that makes use of Google's reCAPTCHA for keeping bots and automated scripts away, you are probably aware that version 1.0 is being phased out. That means you need to integrate version 2.0 into your websites. To that end this article explains how to do just that. I use ASP.NET MVC project to illustrate the integration process but the same applies even for ASP.NET Web Forms and ASP.NET Core applications.
Posted On : 30 Oct 2017
Invoke ASP.NET Web API using TypeScript and XMLHttpRequest
Invoking Web API is a quite common task in modern ASP.NET web applications. Usually, developers resort to jQuery Ajax to call the Web API. If you are using a client side framework such as Angular, you may also use the inbuilt ways to make the Ajax calls. However, what if you aren't using these approaches? This article discusses an alternative.
Posted On : 16 Oct 2017
Prepare ASP.NET projects (Web Forms / MVC / Core) to use Angular 4
As as ASP.NET developer working with latest trends you might want to use Angular 4 in your projects. Unlike libraries such as jQuery, Angular 4 is a framework and there are quite a few steps involved before you actually start utilizing its powerful features. To that end this article explains the steps necessary to prepare your ASP.NET projects to use Angular 4. We will discuss the process for all the three flavors of ASP.NET available today - ASP.NET Web Forms, ASP.NET MVC and ASP.NET Core.
Posted On : 25 Sep 2017
Use XML Data Format In ASP.NET Web API
Modern web application use JSON as the preferred data format for the sake of transferring data between a Web API and its client. However, at times you may want to use XML data format instead of JSON. Although the overall process to accomplish this task is same, there are certain subtle but important differences. To that end this article shows how XML data exchange can be done between an ASP.NET Web API and a jQuery driven client.
Posted On : 18 Sep 2017
Programmatic Model Binding Using UpdateModel()
ASP.NET MVC offers model binding to capture form field values entered in a view. In many cases model binding to complex types serves the purpose. When the model type to fill from the values is known at development time, you can specify a parameter of that type. However, this is not always the case. That is where programmatic model binding comes handy. Programmatic model binding allows you to perform model binding at runtime based on some condition or processing logic.
Posted On : 21 Nov 2016
New book : Beginning SOLID Principles and Design Patterns for ASP.NET Developers
Our New Book, Beginning SOLID Principles and Design Patterns for ASP.NET Developers, is now available. Covers SOLID principles, all GoF design patterns, a select PoEAA and popular JavaScript patterns.
Posted On : 20 Jun 2016
Dealing with varying number of route segments in ASP.NET MVC
Most of the times the ASP.NET MVC routes consists of known number of segments. This works well for many applications. However, at times you may not have idea about the exact number of route segments involved. This article shows how to configure and use catch-all route that deals with such a situation.
Posted On : 10 May 2016
Utilize Server Sent Events in ASP.NET MVC
Some web applications application need to show data in real-time. As soon as the data is made available at the server, it immediately needs to be displayed to the end user. Traditionally developers used to poll the server periodically to check if a new data is available. Wouldn't it be nice if server notifies the client of new data rather than client checking with the server periodically? That is what Server Sent Events (SSE) allow you to do.
Posted On : 02 May 2016
12345678910...Last