asp.net.ph

ValidationSummary.ShowMessageBox Property

System.Web.UI.WebControls Namespace   ValidationSummary Class


Sets or retrieves a value indicating whether the validation summary displays in a pop-up message box.

Syntax


Inline <asp:validationsummary showmessagebox ... >
Script ValidationSummary.ShowMessageBox [ = true | false ]

Property Value

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.

Remarks

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.

Example

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 

See Also

ValidationSummary Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph