ASP.NET HTML 控件 Validationsummary
asp.net html 控件 validationsummary
<!doctype html>
<html>
<body>
<form runat="server">
<table>
<tr>
<td>
<table bgcolor="#b0c4de" cellspacing="10">
<tr>
<td align="right">name:</td>
<td><asp:textbox id="txt_name" runat="server"/></td>
<td>
<asp:requiredfieldvalidator
controltovalidate="txt_name"
errormessage="name"
text="*"
runat="server"/>
</td>
</tr>
<tr>
<td align="right">card type:</td>
<td>
<asp:radiobuttonlist id="rlist_type"
repeatlayout="flow"
runat="server">
<asp:listitem>diners</asp:listitem>
<asp:listitem>mastercard</asp:listitem>
<asp:listitem>visa</asp:listitem>
</asp:radiobuttonlist>
</td>
<td>
<asp:requiredfieldvalidator
controltovalidate="rlist_type"
errormessage="card type"
initialvalue=""
text="*"
runat="server"/>
</td>
</tr>
<tr>
<td></td>
<td><asp:button id="b1" text="submit" runat="server"/></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<asp:validationsummary
headertext="you must enter a value in the following fields:"
displaymode="bulletlist"
enableclientscript="true"
runat="server"/>
</form>
</body>
</html>
<html>
<body>
<form runat="server">
<table>
<tr>
<td>
<table bgcolor="#b0c4de" cellspacing="10">
<tr>
<td align="right">name:</td>
<td><asp:textbox id="txt_name" runat="server"/></td>
<td>
<asp:requiredfieldvalidator
controltovalidate="txt_name"
errormessage="name"
text="*"
runat="server"/>
</td>
</tr>
<tr>
<td align="right">card type:</td>
<td>
<asp:radiobuttonlist id="rlist_type"
repeatlayout="flow"
runat="server">
<asp:listitem>diners</asp:listitem>
<asp:listitem>mastercard</asp:listitem>
<asp:listitem>visa</asp:listitem>
</asp:radiobuttonlist>
</td>
<td>
<asp:requiredfieldvalidator
controltovalidate="rlist_type"
errormessage="card type"
initialvalue=""
text="*"
runat="server"/>
</td>
</tr>
<tr>
<td></td>
<td><asp:button id="b1" text="submit" runat="server"/></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<asp:validationsummary
headertext="you must enter a value in the following fields:"
displaymode="bulletlist"
enableclientscript="true"
runat="server"/>
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages 类参考手册
- ASP.NET Razor C# 循环和数组
- ASP.NET MVC 数据库
- ASP.NET MVC 安全
- ASP.NET MVC HTML 帮助器
- ASP.NET MVC – 发布
- ASP.NET MVC 参考手册
- ASP.NET Web 表单
- ASP.NET TextBox 控件
- ASP.NET HyperLink 控件
- ASP.NET Label 控件
- ASP.NET ListBox 控件
- ASP.NET Literal 控件
- WebSecurity ConfirmAccount 方法
- WebSecurity RequireRoles 方法
- WebSecurity UserExists 方法
- HTML InputImage
- ASP.NET HTML 控件 Checkbox
- ASP.NET HTML 控件 用 重复
- ASP.NET HTML 控件Table 2