Search code examples
asp.net-mvc-3user-controlscode-behind

how to develope Independent User control in mvc3 with controller


I am building the User control in mvc. I want to write the controller for the user control where actions should access the WCF web service and its methods. What i need to do. is MVC3 supports bussiness logic classess for User control like normal asp.net supports .cs file as code behind to user control. I don't want to write any server side code in .ascx file. what should i need to do ? some how usercontrol should be generic with isolated business logic.


Solution

  • This question has been asked an answered here. MVC 3 does not preclude you from using web forms approach that you are used to. But anyone one would benefit from using Razor, which is large paradigm shift from the use of webforms and takes a very different approach to the concept of reusable controls.