C
Charles Law
I have an html input (type=text) field on an html page, with runat=server.
The field is inside a form element. It looks like this:
<FORM id="Form1" method="post" runat="server" action="mypost.aspx">
<INPUT id="Text1" type="text" Name="myname" runat="server">
</FORM>
When the form posts to another page, I want to access the input field on the
target page by the name 'myname'.
I have found that name is getting overwritten by the id, that is, both id
and name are reading as Text1. However, if I remove the runat=server on the
control, it is not overwritten.
Is this normal behaviour?
How can I prevent the id replacing the name, but still keep the
runat=server?
TIA
Charles
The field is inside a form element. It looks like this:
<FORM id="Form1" method="post" runat="server" action="mypost.aspx">
<INPUT id="Text1" type="text" Name="myname" runat="server">
</FORM>
When the form posts to another page, I want to access the input field on the
target page by the name 'myname'.
I have found that name is getting overwritten by the id, that is, both id
and name are reading as Text1. However, if I remove the runat=server on the
control, it is not overwritten.
Is this normal behaviour?
How can I prevent the id replacing the name, but still keep the
runat=server?
TIA
Charles