简体   繁体   中英

How to create custom control tool for textbox validation?

我想创建一个像文本框验证这样的工具,那么如何在 asp.net c# 中创建文本框验证工具

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM