ASP.NET2.0 allows controls in a page to be grouped logically so that postback in one group is not dependent on another!
Each button will now have a new attribute called ValidationGroup
The RequireFieldValidator will also have this attribute which signifies what group it belongs to!
A new feature of the RequireFieldValidator is the SetFocusOnError attribute. It will set the focus of the page to the ControlToValidate when the error occurs!
asp:requiredfieldvalidator id="RequiredFieldValidator1" errormessage="Required Field Validator Error" ControlToValidate="txtAge" ValidationGroup="groupOfControls" SetFocusOnError="True"
No comments:
Post a Comment