ASP.NET MVC: we need a declarative control model

Published Wed, Jul 30 2008 14:34

Yes, I’ve been asking this for some time now…in fact, this is the only thing I miss from the traditional ASP.NET Web Forms model. Those clear aspx pages, with really few <%%> crap (oopss, I mean tags) springled through out my pages – the only place I did need them was inside templates.

Notice that I’m not asking for viewstate or postback events. No, no, no! I don’t want that! What I want is to put something like this:

<div id=”mySpan” runat=”server”>Hello, world!</div>

And be able to access them from the codebehind page. This would lead to much cleaner pages…btw, and since 'I’m asking, I’d like to make it clear that I don’t want that ID based on container generation “thingy” either! Ok, now that I’ve made the complaint of the day, it’s time to go back to business…

Filed under: ,

Comments

# Bertrand Le Roy said on Wednesday, July 30, 2008 2:44 PM

Did you actually try that? Don't see why it wouldn't work.

# luisabreu said on Wednesday, July 30, 2008 4:20 PM

They do work...the idea of having new ones was clearing up the non-used stuff (viewstate, etc) and add some properties which make sense with MVC (for instance, having some sort of specify a route declaratively woudl be really great)

Leave a Comment

(required) 
(required) 
(optional)
(required)