|
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 |
|
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 |
|
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 |
|
|
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 |
|
AngularJS Directive That Invokes ASP.NET MVC Action |
Recently one of the readers asked whether an AngularJS directive can invoke ASP.NET MVC actions. This article shows how a simple AngularJS directive can be created that invokes an ASP.NET MVC action using Ajax. Usually an AngularJS directive is used to perform some UI centric operation. However, nothing prevents an AngularJS directive from invoking some server side code (say an action method) to get some job done.
|
Posted On : 14 Mar 2016 |
|
Select All and Delete using ASP.NET MVC and AngularJS |
In my previous article I illustrated how jQuery can be used to select and delete records in an ASP.NET MVC application. A few readers asked how the same can be accomplished using AngularJS instead of jQuery. This article shows just that.
Recollect how our Index view looks like and how it allows you to select all rows through the header checkbox or individual rows through the respective checkboxes.
|
Posted On : 15 Feb 2016 |
|
Select All and Delete using ASP.NET MVC and jQuery Ajax |
Sometimes you need to select records for certain action using checkboxes. For example, you may select records for deleting and then delete them from the database. Consider the following screen shot that shows such an example in action. |
Posted On : 02 Feb 2016 |
|
|