Reputation: 391
My project is being migrated from n-tier to MVC3. I have a Calendar control that needs to be migrated to MVC . The Tough part is that the Control has been implemented in .cs file.
So now here are my questions
1) Where should i place that .cs Control?
2) How will i be able to <% Register TagPrefix=... %> my user control?
3) How to call the properties of the Control?
4) How to use the javascripts used for the Control.
One more thing, i'm a begginer in MVC. So Simple english would be much helpful...
Upvotes: 0
Views: 774
Reputation: 1039398
1) Where should i place that .cs Control?
Nowhere. There's no code behind notion in ASP.NET MVC
2) How will i be able to <% Register TagPrefix=... %> my user control?
You won't be able. You don't use server side controls in ASP.NET MVC
3) How to call the properties of the Control?
See 2)
4) How to use the javascripts used for the Control.
See 3)
So you will have to redesign this control so that it no longer relies on ViewState and PostBack which are notions that no longer exist in ASP.NET MVC. Or use an existing one such as jQuery UI DatePicker or fullCalendar for example. Or Telerik Calendar which has explicitly been designed for ASP.NET MVC.
Upvotes: 1