Can you explain to me the point of a controller when all it does it return a view? Have I missed the point here?
I’ve come across a situation when trying to build a rudimentary CMS where the user can create views (stored in the database), but of course as they are user created, the controller’s don’t exist. So is there another way to serve them?
Thanks for any help, I’m still trying to get to grips with MVC fully!
Who said that all a controller does is to return a view? A controller does lots of other things. For example it could receive the user input under the form of an action parameters, check whether the ModelState.IsValid, do some processing on the Model and then return a View which is the whole point of the MVC pattern.
Yes, of course. You could use a custom virtual path provider by implementing the VirtualPathProvider class.