Latest web development tutorials

ASP.NET ValidationGroup property

ListControl control Reference Manual ListControl control Reference Manual

Definition and Usage

ValidationGroup attribute specifies the verification is to verify control group.

This property is usually in the form of several button use.

grammar

<asp:SomeListControlValidationGroup="group" runat="server" />

属性 描述
group 要验证的控件组。


Examples

The following examples Verify that the specified controls:

<form runat="server">
<asp:RadioButtonList id="rb1"
ValidationGroup="valGroup1" runat="server">
<asp:ListItem Value="Item 1" />
<asp:ListItem Value="Item 2" />
</asp:RadioButtonList>

<asp:RequiredFieldValidator id="ReqField1"
ControlToValidate="rb1" ErrorMessage="Required"
ValidationGroup="ValGroup1" runat="server" />
<asp:Button id="Bt1" Text="Validate"
CausesValidation="True" ValidationGroup="ValGroup1"
runat="server" />
</form>

The demonstration >>

ListControl control Reference Manual ListControl control Reference Manual