ValidationSummaryControl.ascx
上传用户:husern
上传日期:2022-03-24
资源大小:534k
文件大小:2k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Register Assembly="Itenso.WebUserForms.Controls" Namespace="Itenso.WebUserForms.Controls"
  2.   TagPrefix="cc1" %>
  3. <%@ Control Language="C#" AutoEventWireup="true" %>
  4. <table width="100%">
  5.   <tr>
  6.     <td width="20%">
  7.       <asp:Label ID="Label1" runat="server" Text="Name:"></asp:Label>
  8.     </td>
  9.     <td>
  10.       <cc1:TextBox ID="TextBox1" runat="server" FieldName="UserName"></cc1:TextBox>
  11.       <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="None"
  12.         ControlToValidate="TextBox1" ErrorMessage="Please enter the name."></asp:RequiredFieldValidator>
  13.     </td>
  14.   </tr>
  15.   <tr>
  16.     <td>
  17.       <asp:Label ID="Label2" runat="server" Text="Age:"></asp:Label>
  18.     </td>
  19.     <td>
  20.       <cc1:TextBox ID="TextBox2" runat="server" FieldName="UserAge"></cc1:TextBox>
  21.       <asp:RangeValidator ID="RangeValidator1" runat="server" Display="None" ErrorMessage="Please enter value from 10 to 120.."
  22.         MaximumValue="120" MinimumValue="10" Type="Integer" ControlToValidate="TextBox2"></asp:RangeValidator>
  23.       <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="None"
  24.         ControlToValidate="TextBox2" ErrorMessage="Please enter the age."></asp:RequiredFieldValidator>
  25.     </td>
  26.   </tr>
  27.   <tr>
  28.     <td>
  29.     </td>
  30.     <td>
  31.       <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
  32.     </td>
  33.   </tr>
  34. </table>
  35. <cc1:UserFormHeader ID="UserFormHeader1" runat="server" Description="Validation Summary Control"
  36.   Type="Test" Name="ValidationSummaryControlForm" />