Category Archives: ASPDOTNET MVC

Issue when working with WebSecurity in time of login or register or createuser

For above reason, exception throws which looks like To call this method, the Membership.Provider property must be an instance of ExtendedMembershipProvider In details to solve this issue: 1.    Create a new MVC 4 project using the “Empty” template2.    Add Two references WebMartix.Data and WebMatrix.WebData 3.    Now main task which we have to complete. Go to […]

Issue Compressing or minifying not working in Asp Dotnet MVC Bundle

Script sometimes not minifying or compressing which are referenced in bundle config. This can be happend-                          1.because Bundle is used instead of ScriptBundle                         2.occur when you are in DEBUGGING mode. Ok after testing above things if still there is problem then add this to your bundle config                          BundleTable.EnableOptimizations = true;

Query String Generating In MVC Using Razor Syntex

A query string is the part of a uniform resource locator (URL) containing data that does not fit conveniently into a hierarchical path structure. The query string commonly includes fields added to a base URI by a Web browser or other client application, for example as part of an HTML form.Query strings can be generated […]

Handling MVC Submit Button Similar As AspDotNet Button

To detect multiple button event separately like ASP.NET button event then here is a mostly clean attribute-based solution for the multiple submit button issue. You decorate an action method in a controller with the ActionNameSelectorAttribute (or a subclass), ASP.NET MVC will use this attribute to determine which action method to call. In View Just Create […]

Data passing way from view to controller

From View you can send data in multiple ways. Here one can choose any one option to do that: Option 1: When if all model data needed then follow this way-In View: @using(Html.BeginForm()) { //all model data <input type=”submit” value=”SaveData” name=”command”> } In controller: public ActionResult Index(Roster model)  Option 2: In your form submission time, […]