Web Forms not submitting on server
Date: 08/31/05
(Asp Dot Net) Keywords: html, asp, web
I have a web form i have build to submit to another page
and it keeps trying to submit to the inital form page even
though the action is set to pagetwo.aspx.
I made a simple test form from the book and that doesn't
submit either, here follows the code but it appears to just
ignore the action command in the form and submit PageOne.aspx
to PageOne.aspx? any thoughts?
PageOne.aspx
[%@ Page Language="vb" Debug="true" %]
[script language="vb" runat="server"]
[/script]
[form action="test2.aspx" method="get" enctype="multipart/form-data" id="form1" runat="server"]
[asp:TextBox ID="TG1" runat="server"/]
[asp:DropDownList ID="TG2" runat="server"]
[asp:ListItem Value="1" Text="Yes"/]
[asp:ListItem Value="2" Text="No"/]
[asp:ListItem Value="3" Text="Maybe"/]
[/asp:DropDownList]
[input type="submit" id="submit"]
[/form]
PageTwo.aspx
[%@ Page Language="vb" Debug="true" %]
[script language="vb" runat="server"]
Dim TG1a As String
Dim TG2a As String
TG1a = Request.Form(TG1)
TG2a = Request.Form(TG2)
message.text = TG1a
message2.text = TG2a
[/script]
[html]
[head]
[meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"]
[title]Untitled Document[/title]
[/head]
[body]
[asp:Label ID="TG1a" runat="server"/]
[asp:Label ID="TG2a" runat="server"/]
[/body]
[/html]
Source: http://www.livejournal.com/community/aspdotnet/42631.html