ASP.NET HTML 控件 Validationsummary 2
asp.net html 控件 validationsummary 2
<!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>
<asp:validationsummary
showmessagebox="true"
showsummary="false"
headertext="you must enter a value in the following fields:"
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>
<asp:validationsummary
showmessagebox="true"
showsummary="false"
headertext="you must enter a value in the following fields:"
enableclientscript="true"
runat="server"/>
</form>
</body>
</html>
相关文章
- ASP.NET Web Pages 教程
- ASP.NET Web Pages 文件夹
- ASP.NET Web Pages WebGrid
- ASP.NET Web Pages Database 参考手册
- ASP.NET Razor C# 循环和数组
- ASP.NET Web 表单
- ASP.NET Repeater 控件
- ASP.NET 母版页
- ASP.NET Calendar 控件
- WebSecurity CurrentUserId 属性
- WebSecurity CreateUserAndAccount 方法
- WebSecurity InitializeDatabaseConnection 方法
- WebSecurity Login 方法
- WebSecurity Logout 方法
- HTML InputRadiobutton
- ASP.NET HTML 控件 Calendar 2
- ASP.NET HTML 控件 DropdownList
- RadiobuttonList
- ASP.NET HTML 控件 RegularExpressionValidator
- ASP.NET HTML 控件 Validationsummary