Category Archives: ASP.Net MVC

ASP.Net MVC Core Action filter sample for parameter validation

Filters have a special place in ASP.Net MVC Framework. Filters are custom classes/middlware that provide declarative and programmatic means to add pre-action and post-action behavior to controller action methods . Filters run in the context of MVC action processing pipeline. ASP.Net MVC supports 4 different types of filters. Authorization filter – deals with authorization logic.… Read More »

Generate multi checkbox list in asp.net mvc

Unfortunately, there is no built-in Html helper or Tag Helper which can render multi-checkbox list in asp.net mvc. Following syntax is old school I get it :-). I must have authored a Tag Helper extension. Any ways, this code snippet conveys the point rather in a traditional way

Sample bootstrap user details form embedded with asp.net mvc validation

Simple bootstrap based html form to quickly create form for data input along with field level validation supported by asp.net mvc validation and bootstrap css classes to flag errors. bootstrap forms, asp.net mvc validation

Simple pagination in asp.net mvc

Pagination is a common need when serving large datasets in any program. In a ASP.Net MVC web app, rendering a large dataset, it makes sense to paginate dataset for responsiveness  and serve that dataset records in terms of pages and a predetermined fixed page size. Following code snippet tries to achieve similar function of computing… Read More »

Troubleshooting checklist for http errors 403.14 or 404 not found for asp.net mvc web app on IIS 7.5

If you ever ran into deploying asp.net mvc app onto IIS 7.5 running on pristine new dev boxes and encounter http errors as indicated in the title, follow this checklist to troubleshoot. First and foremost, check if right version of ASP.Net is installed and registered with IIS. To verify that, aspnet_iis.exe tool is your friend.… Read More »

Custom Model Validation Provider for enabling ASP.NET MVC 3 client side validation.

Implementing Custom Model Validation Provider to enable client side MVC 3 validation The Validation framework of ASP.NET MVC 3 is designed for extensibility and customization.  It supports validation model using attributes, or by implementing IValidatableObject or unobtrusive javascript based client side validation. It supports both property based or model based validation.But, again ASP.Net MVC 3 assumes… Read More »

UI Design Patterns: Model View Presenter(MVP) pattern and Model View Controller(MVC) pattern

Introduction to UI Design Patterns: UI design patterns isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. There are a number of frameworks in use today that are based on these… Read More »