Filter In MVC 3


What is Filter –As per MSDN “Filters are classes that provide both a declarative and programmatic means to add pre-action and post-action behavior to controller action methods. –It let perform logic either before an action method is called or after an action method runs.” like before executing an action method of controller you want to … Continue reading Filter In MVC 3

Custom validation in ASP.NET MVC 3


As you may know that you can implement validation using validation attributes that come in (System.ComponentModel.DataAnnotations namespace) in MVC , although there are numbers of  validation attributes are provided by the framework like  [Required], [Range],  [StringLength], Compare and [RegularExpression]  but it might not fulfill your business requirements, in this case you can write your own validation attribute and use … Continue reading Custom validation in ASP.NET MVC 3

Html.ActionLink VS Html Anchar Tag ()


Here ,in this post i am going to describe about MVC Html.ActionLink and normal anchor tag and which one is best for use. Html.ActionLink Html.ActionLink use current routing configuration in Gloabl.asax.cs to prepare hyperlink at runtime. so when you modify your routing setting in said global file then Html.ActionLink directly  reference modified routing settings that … Continue reading Html.ActionLink VS Html Anchar Tag ()

The Controls collection cannot be modified because the control contains code blocks(i.e. )


Introduction: In this post i am going to reason two things: (1)why error “The Controls collection cannot be modified because the control    contains code blocks (i.e. <% … %>) ” come. (2)How to solve same Cause of error When you add any AJAX extenders to your Web pages of your web application or try to … Continue reading The Controls collection cannot be modified because the control contains code blocks(i.e. )

ASP.NET MVC Application Execution Process


Stage Details Receive first request for the application In the Global.asax file, Route objects are added to the  RouteTable object. Perform routing The UrlRoutingModule module uses the first matching Route object in the RouteTable collection to create the RouteData object, which it then uses to create a RequestContext object. Create MVC request handler The MvcRouteHandler … Continue reading ASP.NET MVC Application Execution Process

ASP.Net menu control not working in Chrome & Safari Browsers


In  Solution Explorer right click your application and add the “ASP.Net Folder”App_Browsers if you don’t already have it. Add a New “Browser File” item to this special folder and call it safari.browser. Delete all default coding in this file and replace it with the following: <browsers> <browser refID=”safari1plus”> <controlAdapters> <adapter controlType=”System.Web.UI.WebControls.Menu” adapterType=”” /> </controlAdapters> </browser> </browsers> … Continue reading ASP.Net menu control not working in Chrome & Safari Browsers