我想创建一个像文本框验证这样的工具,以便如何在asp.net中创建文本框验证工具c#
答案 0 :(得分:0)
<asp:Textbox id="txtLastName" runat="server"></asp:Textbox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server"
ControlToValidate="txtLastName"
ErrorMessage="Last name is a required field."
ForeColor="Red">
</asp:RequiredFieldValidator>