Sorry if this is the main question - I am having trouble moving to ASP.NET MVC from the page frame.
In the page structure, I often use ASCX files to create small encapsulated pieces of functionality that can be included in various places on the site. If I am building a page and I need one of these controls - I just add a link and everything just works.
As far as I can tell, in MVC, an ASCX file is only a partial representation. Does this mean that wherever I want to add one of these units of functionality, I also need to add code to the controller action method to make sure that the corresponding ViewData is available for ASCX?
If so, it seems to me that this is a little step back. This means, for example, that I could not simply βdropβ the control onto the main page without having to add code for each controller whose views use this main page!
I suspect I am missing something - any help would be appreciated.
Thank you, Chris
source
share