0

How can we use web user controls in Asp.net MVC 4 the same way we use in ASP.net web forms application.
I didn't find any simple article on it yet

6
  • 1
    Are you asking for a tutorial on web controls in asp.net MVC 4? Commented Aug 28, 2013 at 13:02
  • 1
    You mean like a partial view? Commented Aug 28, 2013 at 13:06
  • If you want web forms, use web forms. MVC uses a different approach devoid of controls, viewstate and the page life cycle. Commented Aug 28, 2013 at 13:19
  • @Ryan Gates yes, but i don't know how to use partial view. In web form application, I used to render controls dynamically (for current user) in default.aspx. Is that possible in mvc 4. Also what is alternative for page_load method in mvc 4? Commented Aug 28, 2013 at 13:30
  • 2
    Given the questions you are asking, you are not familiar with MVC paradigm, I highly recommend that you work through the tutorials available for MVC - asp.net/mvc/tutorials. We all have to start somewhere, and these are a great way to learn MVC architecture. Commented Aug 28, 2013 at 13:39

1 Answer 1

4

In MVC - there are not any built in controls like you are used to seeing in WebForms (DataGrid, BreadCrumb, etc). These WebForm controls relied on concepts that do not exist in the MVC framework such as ViewState and PostBack. There have been many discussions around the use of WebForms vs MVC, web controls and lack thereof, but this is not the place for those.

You can build your own (using partial views for instance) or look at the third party components (Telerik).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.