In this tip, I demonstrate how you can retrieve a view from any folder in an ASP.NET MVC application. I show you how to use both specific paths and relative paths. Until today, I thought that a controller action could return a view from only one of two places: · Views\ controller name · Views\Shared For example, if you are working with the ProductController, then I believed that you could only return a view from either the Views\Product folder or the Views\Shared folder. When looking through the source code for the ViewLocator class, I discovered that I was wrong. If you supply a “Specific Path” for a view, you can retrieve a view from any location in an ASP.NET MVC application. The ProductController.Index() action in Listing...(read more)
Source Click Here.
A
New
Internet
Library: Add Your Website/Blog
or Suggest A Website/Blog to our Free Web Directory
http://anil.myfunda.net.
Its very simple, free and SEO Friendly. Submit Now....
Its very simple, free and SEO Friendly. Submit Now....
Friday, July 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Post your comments here: