requiredfieldvalidator

代碼:

<!DOCTYPE html>

<html>

<body>

 

<form runat="server">

Name: <asp:TextBox id="name" runat="server" />

<br>

Age: <asp:TextBox id="age" runat="server" />

<br><br>

<asp:Button runat="server" Text="Submit" />

<br><br>

<asp:RequiredFieldValidator

ControlToValidate="name"

Text="The name field is required!"

runat="server" />

</form>

 

</body>

</html>

結(jié)果:

相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频