Model Binder in Asp.net MVC

Introduction Model binding is one of the magic things in MVC framework. We know that if the model property matches exactly with view, then MVC architecture automatically takes care of the model binding process. This is very simple and straight forward. But, if the model property is not matched exactly with the view? Then how…

Read More

Save as json file error in internet explorer

when using asp.net mvc json result return , in internet explorer , save as json file option will come. this can be resolved by // this was previous // return Json(new { sView = msg, IsSuccess = isnsuccs }, JsonRequestBehavior.AllowGet); // this is chnaged return Json(new { sView = msg, IsSuccess = isnsuccs }, “text/plain”,…

Read More

Minification and bundling in MVC 4

In MVC 4.0 or asp.net 4.5 , new feature came from microsoft ¬†is Bundling and minification. A)Bundling : Previously Files like multiple css and javascript , which were in queue for selecting single file, but in mvc 4 , multiple js or css files can be treat as single file request to browser , publicstaticvoidRegisterBundles(BundleCollection…

Read More

Temp Data uses in MVC

Tempdata is a dictionary object which derives from¬†TempDataDictionary,Tempdata is very uses full for below uses 1)Passing data from Action to Action in same controller 2)passing data from one controller to another controller 3)From View to Action 4)From Action To view 5)From View To view Tempdata has short live, after getting value from tempdata , the…

Read More

Advantages of Razor View Engine

From Mvc 2.0 there is only aspx view engine which supports only aspx web form syntax . But from MVC 3.0 new view engine introduced Razor view engine .Feature of razor view engine 1)It is Test driven development support 2)It uses Unit testing only , this is the best advantages , not view engine does…

Read More