System.Web.UI.WebControls Namespace ValidationSummary Class
Sets or retrieves a value indicating whether the validation summary displays in a pop-up message box.
Inline |
<asp:validationsummary showmessagebox ... > |
Script |
ValidationSummary.ShowMessageBox [ = true | false ] |
This property accepts or returns only a boolean value: true if the validation summary is to be displayed in a pop-up message box; otherwise, false. Default value is false.
This property can be used in addition to the ShowSummary property to control where the validation summary is displayed.
Because this property relies on a client-side functionality, EnableClientScript must be set to true ( the default ), to display the validation summary in a message box. Otherwise, this property has no effect.
NOTE: If both the ShowMessageBox and ShowSummary properties are set to true, the validation summary is displayed in both a message box and on the Web page.
The following shows how to declaratively set the ShowMessageBox property of a ValidationSummary control at design time, to display the error message of a RequiredFieldValidator in a pop-up message box.
<asp:validationsummary runat = "server" displaymode = "singleparagraph"
showmessagebox showsummary=false />
Show me
ValidationSummary Members