Display validation summary in a popup in asp .net
In this topic we are going to see how to Display validation summary in a popup in asp .net.
The ValidationSummary Server Control:-
The ValidationSummary control does not perform validations on the content input into your Web Forms. Instead, it’s a reporting control that the other validation controls on a page use. You can use this validation control to consolidate error reporting for all the validation errors that occur on a page instead of leaving it up to each individual validation control.
You might want this capability for larger forms, which have a comprehensive form-validation process. In this case, you may find having all the possible validation errors reported to the end user in a single and easily identifiable manner to be rather user-friendly. You can display these error messages in a list, bulleted list, or paragraph. This example asks the end user for her first and last name. Each textbox in the form has an associated RequiredFieldValidator control assigned to it. When the page is built and run, the user’s clicking the Submit button with no values placed in either of the textboxes causes both validation errors to fire.
You might want this capability for larger forms, which have a comprehensive form-validation process. In this case, you may find having all the possible validation errors reported to the end user in a single and easily identifiable manner to be rather user-friendly. You can display these error messages in a list, bulleted list, or paragraph. This example asks the end user for her first and last name. Each textbox in the form has an associated RequiredFieldValidator control assigned to it. When the page is built and run, the user’s clicking the Submit button with no values placed in either of the textboxes causes both validation errors to fire.
validation summary in a popup:-
From this code example, you can see that the ShowSummary property is set to false — meaning that the bulleted list of validation errors are not shown on the actual web page. However, because the ShowMessageBox property is set to true, you now get these errors reported in a message box.
0 comments:
Post a Comment