The method under asp.net that gets the value of a non server control using Request.From

  • 2020-05-09 18:24:09
  • OfStack


<tr> 
<td> Login name: <input id="Text1" type="text" name="loginName" /><asp:Label ID="Label1" runat="server" 
Text=" The username already exists "></asp:Label> 
</td> 
</tr> 
<tr> 
<td> The secret     Code: <input id="Text2" type="text" name="passWord" /></td> 
</tr> 

The Name property of the client control is used here.
Response.Write(Request.Form["loginName"].ToString()+Request.Form["passWord"].ToString());
This allows you to get values for non-server controls in the background.

Related articles: