3

I am trying to use ASP.NET Server Controls (ASP.TextBox etc) with MVC (to take advantage of the validation power, designer support etc). How can I shoehorn this into MVC architecture? For example, how can my button.click route to the controller or how can the data inside my server controllers be accessed via viewPage?

Can point me to an article or reference that will help to clear up my messy design? Or, is it better for me to stick to MVC and inline styles?

2 Answers 2

6

I would stick with the MVC way or revert to web forms... Are you trying to get support for designers using dreamweaver? That's actually a good point, mvc's HtmlHelper is not dreamweaver friendly.

2
  • even VS Desginer cannot show the elements generated using HTMLHelper Object so in practice you cant have WYSWYG kind support in MVC :(
    – Gripsoft
    Commented Jan 21, 2009 at 13:02
  • I should mention, working with designers has been harder with mvc :/ having explain the views is getting a bit old
    – ccook
    Commented Jan 21, 2009 at 13:05
1

I wouldn't try to mix the two; they are very different approaches, and aren't really compatible with each-other during the same page request. RenderPartial might work, but I wouldn't wager any money.

Note that for MVC views, the code-behind file (usually empty) is also being removed in the RC.

1
  • Yes I agree with your , but my point is that Microsoft still can embed the Server Controls in MVC architecture and after delving in their details i realized the MVC framework by MS or MonoRail by Open Source guys do not have much differences then,
    – Gripsoft
    Commented Jan 21, 2009 at 15:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.