Meditation and Mindfulness for Software / IT Professionals. Conducted by Bipin Joshi in Thane. Read more...

ASP.NET MVC

12345678910
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
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
Use Global Ajax Event Handler Methods in jQuery
Now a days many ASP.NET applications use jQuery Ajax in one or the other way. jQuery methods such as $.ajax(), $.get() and $.post() are commonly used in such applications. When you make multiple Ajax calls from a single page you may take advantage of the global Ajax event handler methods of jQuery. To that end this article provides a quick reference of various global Ajax configuration methods that can simplify your jQuery code.
Posted On : 07 Dec 2015
Overloading Controller Actions in ASP.NET MVC
Method overloading is very common technique used in C# code. Although it works great for normal C# classes, the same can't be said about ASP.NET MVC controller classes. Unlike an ordinary C# class, a controller is dealing with HTTP protocol. And HTTP doesn't understand overloading as C# does. So, in case you wish to use method overloading in a controller you need to consider the ways as discussed in the remainder of this article.
Posted On : 05 Oct 2015
Select, Zip and Download Files Programmatically in ASP.NET MVC
You might have already seen websites that display a list of files to the end user. The user can then select one or more files from the list and request a zipped bundle of those files as a single download. In this article you will learn how to do just that. You will use classes from System.IO.Compression namespace to zip the files programmatically.
Posted On : 21 Sep 2015
12345678910