views:

108

answers:

3

Looking at some of the changes coming to WebForms in ASP.NET 4.0 I can see many improvements that give developers even more control over the output. Some of these improvement have been a long time coming, and for some time it seemed that it wasn't even possible. It made me wonder if the current model with the single form element that runs on the server is really the only possible way.

Why couldn't the ASPNET WebForm architecture work with multiple forms that all run on the server?

Imagine if you could architect this change. How would it impact the way we write codebehind today? Would it introduce extra complexity? Would it change the way event handlers work, or validation, or ASP.NET Ajax with the ScriptManager and UpdatePanel controls?

A: 

I think .NET mvc is MS making the change you speak of.

David Archer
No, I was talking about ASP.NET WebForms. ASP.NET MVC is not a change to ASP.NET WebForms, it's a completely new framework for writing web applications.
michielvoo
Yes, but if you're talking about a framework that has multiple forms, then its not webforms. WebForms, as the name implies, is a framework for a bunch of linked web forms. That's why in webform framework, 1 url == 1 form.
David Archer
A: 

From a ASP.NET book Im not going to mention because I'm not sure if I'm allowed to, it says that before with ASP you could put 2 forms in the same page so some people in the same webpage could put a form for authentication for registered users and a form for creating an account for new users, something you cant do in ASP.NET because of the limitation of the framework. So you should be able to do that again if they would add that possibility in ASP.NET

Pablo
Why wouldn't you be allowed to mention a book?
PhilPursglove
I don't know, publicity? I havent read the terms of use of the website, to be honest, where are they?
Pablo
A: 

You can toggle forms very easily on the page level: http://www.codersbarn.com/post/2008/03/08/Solution-to-ASPNET-Form-PayPal-Problem.aspx

IrishChieftain
That's not the answer to my question though.
michielvoo
This technique effectively allows you to have multiple forms. Other than that, you would have to move away from the Web Form Postback architecture :-)
IrishChieftain