Thursday, August 1, 2013

MVC- Multiple Views with Display Mode in MVC4

Another intersting white paper on MVC internals. I m just wanting them to file this references in my blog so that I can revisit them anytime at my leisure. Well If you're following my blogs you'll definately find some cool knowledge references to MVC.

Discalimer Content taken from below write up to short summary of content given.
As you know, you should also have a file named index.cshtml located under the Views/Home folder in the project. This file will provide the HTML for the browser. In the body of the Index method above you code (or better, you invoke from other components) the logic required to serve the request. If, by executing this piece of logic, data is produced which needs to be embedded in the view, then you pass this data down to the view object by adding an argument to the View method.

Now in ASP.NET MVC 4 there’s an extra piece of magic that you might not know about yet. To experience the thrill of it, you add a new file to the Views/Home folder named You can give this file any content you like; just make sure the content is different from the aforementioned index.cshtml.

Read More.
Post a Comment