RadInputManager验证效果,很酷哦
<body style="background-color: #DFF3FF;">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<telerik:RadInputManager EnableEmbeddedSkins="false" ID="RadInputManager1" runat="server">
<telerik:RegExpTextBoxSetting EmptyMessage="E-mail addres" EmptyMessageCssClass="radEmptyMessageCss_Default"
FocusedCssClass="radFocusedCss_Default" HoveredCssClass="radHoverCss_Default" InvalidCssClass="radInvalidCss_Default"
ErrorMessage="Invalid e-mail"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
<TargetControls>
<telerik:TargetInput ControlID="Panel1" />
</TargetControls>
</telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>
<asp:Panel ID="Panel1" runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</asp:Panel>
</div>
</form>
</body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<telerik:RadInputManager EnableEmbeddedSkins="false" ID="RadInputManager1" runat="server">
<telerik:RegExpTextBoxSetting EmptyMessage="E-mail addres" EmptyMessageCssClass="radEmptyMessageCss_Default"
FocusedCssClass="radFocusedCss_Default" HoveredCssClass="radHoverCss_Default" InvalidCssClass="radInvalidCss_Default"
ErrorMessage="Invalid e-mail"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
<TargetControls>
<telerik:TargetInput ControlID="Panel1" />
</TargetControls>
</telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>
<asp:Panel ID="Panel1" runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</asp:Panel>
</div>
</form>
</body>