I have a User Control with an input filed.
<input type="text" name="firstName1" id="txtFirst1" />
I am trying to obtain the value enterd by the user from the code behind page. I do not want to add the property runat="server" to the field.
I have tried using the following code, but with no luck:
Dim MyFistName As String = Request.Form("txtFirst1")
How can I get the value of the input field txtFirst1 without adding runat="server"?
Use this:
Request.Form['txtFirst1']
ie (C#):
string inputValue = String.Format("{0}", Request.Form['txtFirst1']);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.