N
nzanella
Hello,
I just ran into the restriction of ASP.NET allowing no more than
one <form> tag with the runat="server" attribute per page. This
seems like a big restriction to me. I ran across the following
article:
http://msdn.microsoft.com/msdnmag/issues/03/05/CuttingEdge/
which suggests the following workaround (which consists of
defining user controls for the contents of each form and
incorporating the result into one single form):
<form runat="server">
<msdn:MyRegForm runat="server" id="userRegForm"
action="register.aspx" />
<hr>
<msdn:MyLogForm runat="server" id="userLogForm"
action="login.aspx" />
</form>
However, I was not satisfied with this solution. The reason
is that if there are ASP validation controls on both forms
then error messages will be displayed for Form B whenever
the user submits Form A and conversely, which is plain
incorrect. So the solution described therein is just
not really a solution.
What I am going to do is ditch the ASP.NET framework's
web controls altogether and code my pages PHP style,
with ASP and no .NET, and manage my own POST variables.
Is there another way that actually works and isn't messy?
Regards,
Thanks,
Neil
I just ran into the restriction of ASP.NET allowing no more than
one <form> tag with the runat="server" attribute per page. This
seems like a big restriction to me. I ran across the following
article:
http://msdn.microsoft.com/msdnmag/issues/03/05/CuttingEdge/
which suggests the following workaround (which consists of
defining user controls for the contents of each form and
incorporating the result into one single form):
<form runat="server">
<msdn:MyRegForm runat="server" id="userRegForm"
action="register.aspx" />
<hr>
<msdn:MyLogForm runat="server" id="userLogForm"
action="login.aspx" />
</form>
However, I was not satisfied with this solution. The reason
is that if there are ASP validation controls on both forms
then error messages will be displayed for Form B whenever
the user submits Form A and conversely, which is plain
incorrect. So the solution described therein is just
not really a solution.
What I am going to do is ditch the ASP.NET framework's
web controls altogether and code my pages PHP style,
with ASP and no .NET, and manage my own POST variables.
Is there another way that actually works and isn't messy?
Regards,
Thanks,
Neil