扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:天极新技术工作室 来源:yesky 2007年10月26日
关键字: Windows
<!--源文件:form\ServerControl\summary.aspx--> <%@ Page clienttarget=downlevel %> <html> <head> <script language="VB" runat="server"> Sub ListFormat_SelectedIndexChanged(sender As Object, e As EventArgs) ' Change display mode of the validator summary when a new option ' is selected from the "ListFormat" dropdownlist valSum.DisplayMode = ListFormat.SelectedIndex End Sub </script> </head> <BODY> <h3><font face="Verdana">ValidationSummary Sample</font></h3> <p> <form runat="server"> <table cellpadding=10> <tr> <td> <table bgcolor="#eeeeee" cellpadding=10> <tr> <td colspan=3> <font face=Verdana size=2><b>Credit Card Information</b></font> </td> </tr> <tr> <td align=right> <font face=Verdana size=2>Card Type:</font> </td> <td> <ASP:RadioButtonList id=RadioButtonList1 RepeatLayout="Flow" runat=server> <asp:ListItem>MasterCard</asp:ListItem> <asp:ListItem>Visa</asp:ListItem> </ASP:RadioButtonList> </td> <td align=middle rowspan=1> <asp:RequiredFieldValidator id="RequiredFieldValidator1" ControlToValidate="RadioButtonList1" ErrorMessage="Card Type. " Display="Static" InitialValue="" Width="100%" runat=server> * </asp:RequiredFieldValidator> </td> </tr> <tr> <td align=right> <font face=Verdana size=2>Card Number:</font> </td> <td> <ASP:TextBox id=TextBox1 runat=server /> </td> <td> <asp:RequiredFieldValidator id="RequiredFieldValidator2" ControlToValidate="TextBox1" ErrorMessage="Card Number. " Display="Static" Width="100%" runat=server> * </asp:RequiredFieldValidator> </td> </tr> <tr> <td align=right> <font face=Verdana size=2>Expiration Date:</font> </td> <td> <ASP:DropDownList id=DropDownList1 runat=server> <asp:ListItem></asp:ListItem> <asp:ListItem >06/00</asp:ListItem> <asp:ListItem >07/00</asp:ListItem> <asp:ListItem >08/00</asp:ListItem> <asp:ListItem >09/00</asp:ListItem> <asp:ListItem >10/00</asp:ListItem> <asp:ListItem >11/00</asp:ListItem> <asp:ListItem >01/01</asp:ListItem> <asp:ListItem >02/01</asp:ListItem> <asp:ListItem >03/01</asp:ListItem> <asp:ListItem >04/01</asp:ListItem> <asp:ListItem >05/01</asp:ListItem> <asp:ListItem >06/01</asp:ListItem> <asp:ListItem >07/01</asp:ListItem> <asp:ListItem >08/01</asp:ListItem> <asp:ListItem >09/01</asp:ListItem> <asp:ListItem >10/01</asp:ListItem> <asp:ListItem >11/01</asp:ListItem> <asp:ListItem >12/01</asp:ListItem> </ASP:DropDownList> </td> <td> <asp:RequiredFieldValidator id="RequiredFieldValidator3" ControlToValidate="DropDownList1" ErrorMessage="Expiration Date. " Display="Static" InitialValue="" Width="100%" runat=server> * </asp:RequiredFieldValidator> </td> <td> </tr> <tr> <td></td> <td> <ASP:Button id=Button1 text="有效性验证" runat=server /> </td> <td></td> </tr> </table> </td> <td valign=top> <table cellpadding=20><tr><td> <asp:ValidationSummary ID="valSum" runat="server" HeaderText="You must enter a value in the following fields:" Font-Name="verdana" Font-Size="12" /> </td></tr></table> </td> </tr> </table> <font face="verdana" size="-1">Select the type of validation summary display you wish: </font> <asp:DropDownList id="ListFormat" AutoPostBack=true OnSelectedIndexChanged="ListFormat_SelectedIndexChanged" runat=server > <asp:ListItem>List</asp:ListItem> <asp:ListItem selected>Bulleted List</asp:ListItem> <asp:ListItem>Single Paragraph</asp:ListItem> </asp:DropDownList> </form> </body> </html> |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者