]; 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 html tag value in asp.net

coldplay.xixi
coldplay.xixiOriginal
2021-03-04 17:28:102350browse

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.

How to get html tag value in asp.net

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn