1 asp.net
如果我有一个html输入"<input id="score1" type="text" value=""/>"并希望在c#页面加载时初始化它,但我不想使用asp控件.我该怎么办?
谢谢
您可以使用runat ="server"来使用服务器端纯HTML控件.
例如:
<input type="text" runat="server" id="myTextBox" />
// ...and then in the code-behind...
myTextBox.Value = "harbl";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
533 次 |
| 最近记录: |