Last post Feb 29, 2012 07:47 PM by ryanw51
Feb 29, 2012 05:24 PM|eherrera|LINK
I am rather new to the MVC 3 environment, and I need help.
I am trying to setup a MVC environment in a portal type of scenerio. So I setup a base project for MVC 3 in VS 2010. The following is the folder structure:
Question 1: how do I bind a specific Controller in /Project1/Controllers to Project1/Views?
Question 2: How do I set up the Project1/Views folder? I know the default Views folder has a web.config file, and the MVC is setup to look in this folder by default. How do I change this behavior, so I can include the Project1/Views.
Feb 29, 2012 06:37 PM|bruce (sqlwork.com)|LINK
please read the mvc docs. view are not servered and not accessed by iis. in mvc the routemap (global.asax) turns a url into an controler action call. only a controler will load a view and it can use any path its wants to find a view (its work but you can
define your own view paths)
Feb 29, 2012 07:13 PM|eherrera|LINK
Thank you for taking the time to comment. As you mentioned, the controller will load a view. I need to be able to tell the controller to look in other folder than the default /Views folder.
You mentioned to read the mvc docs. I have been looking around, and I have not found that information. Can you provide a link.
Feb 29, 2012 07:47 PM|ryanw51|LINK
Take a look at MVC areas. http://msdn.microsoft.com/en-us/library/ee671793.aspx