I am used to ASP.NET where each user control would have its own codebehind, and you do things related to that usercontrol in that codebehind C#.net file, so you can reference the usercontrol anywhere you like.
I am new to ASP.NET MVC, and I added an ascx control, and I can not seem to figure out where do I write the code for setting viewdata specific to that control? I have this ascx control inside my master page, so the setting up for viewdata for that control should be at such a place that is available to all pages, so I can not do it inside Index() or something.