I saw Scott Hanselman screencast on ASP.NET MVC Framework. After watching the video I realized that this MVC framework is pretty much like classic ASP or atleast have some similarities. Check out the code below where I have populated a DropDownList (HTML Select Tag):
<select>
<% foreach (var category in ViewData)
{ %>
<option id="ddlCategories" value = "<%= category.id %>"> <%= category.CategoryName %> </option>
<% } %>
</select>
The controller was responsible for filling the categories and view is responsible for outputting the details. Here is the HomeController which gets the categories:
[ControllerAction]
public void Categories()
{
NorthwindDataContext dc = new NorthwindDataContext();
RenderView("Categories", dc.Categories);
}
I agree that by creating our own rendering engine will give us more flexibility and there will be no viewstate on the page hence making the page run faster *but* now we have a tough job of rendering the items manually. I mean the real power of ASP.NET is the ASP.NET controls. If we are trying to move away from the ASP.NET controls we are missing a lot of features. Now, we have to do everything on our own which includes styling the controls and maintaining their state. Plus, in my opinion it would be harder to maintain the application once you have the classic ASP like code floating in the HTML of the page.
What do you think?