]; 2. Directly Get method."/> ]; 2. Directly Get method.">
Home > Article > Web Front-end > How to get html tag value in asp.net
How to get the html tag value in asp.net: 1. By adding the [runat="server"] method, the code is [d618d1172946c609dbd1ccb46f1782d2]; 2. Direct acquisition method.
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
How to get the html tag value in asp.net:
Two methods:
1. Add runat="server"
<input id="Text1" runat="server" type="text" />
Get string str=this.Text1.value in the background;
2. Get it directly
<input id="Text1" name="GetValue" type="text" /> string str=Request.Form["GetValue"];
Related learning recommendations: html video tutorial
The above is the detailed content of How to get html tag value in asp.net. For more information, please follow other related articles on the PHP Chinese website!