[英]input type=“email” set value in asp.net code behind
我該如何賦值給
<input type="email" class="form-control" placeholder="User name" required="" autofocus="" name="txtEmailId" id="txtEmailId" />
在代碼背后?
使用帶標記的runat="server"
<input type="email" runat="server" class="form-control" placeholder="User name" required="" autofocus="" name="txtEmailId" id="txtEmailId" />
現在txtEmailId
代碼,你可以通過txtEmailId
訪問它
由於使用runat屬性無法使用Html 5控件。 您可以像這樣直接使用TextBox
<asp:TextBox ID="txtEmailId" runat="server" TextMode="Email"></asp:TextBox>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.