|
 |
aspx thread: Pop up Message Boxes
Message #1 by "Hugh McLaughlin" <hugh@k...> on Fri, 24 May 2002 16:29:15
|
|
Hello Everyone and thanks for your help in advance. I am using form
validation in ASP.Net and am satisfied with it, except that you have to
leave room for the error message. Is there a way to use the .Net
validation to create a pop-up-message box instead. Any help would be
greatly appreciated. Thanks.
Message #2 by Feduke Cntr Charles R <FedukeCR@m...> on Fri, 24 May 2002 11:44:30 -0400
|
|
Hugh,
You can use either popup message boxes or dynamic (room for
validation message is not allocated until the message actually needs to be
displayed). I prefer the dynamic display (which doesn't work in down level
browsers:)
yourValidator.Display = ValidatorDisplay.Dynamic;
-OR- (in HTML)
<... RunAt="server" Display="Dynamic" ... />
You can also use the ValidationSummary control to localize all the
validation events messages to a single place, and in this case you can use a
message box (javascript:alert();). If you just want to display in a message
box then...
valSummary.ShowSummary = false;
valSummary.ShowMessageBox = true;
valSummary.EnableClientScript = true;
valSummary.HeaderText = "You must enter values for the following fields:";
valSummary.DisplayMode = ValidationSummaryDisplayMode.BulletedList;
-OR- (in HTML)
<!-- I'll leave this one to your imagination -->
Validation controls do not need to appear within a ValidationSummary
control to be summarized by it. The client script intellegently hooks
validation control's output into a ValidationSummary control if one is
present. You should use a ValidationSummary whenever you have two or more
Validation* controls on a single page.
HTH,
- Chuck
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Friday, May 24, 2002 12:29 PM
To: ASP+
Subject: [aspx] Pop up Message Boxes
Hello Everyone and thanks for your help in advance. I am using form
validation in ASP.Net and am satisfied with it, except that you have to
leave room for the error message. Is there a way to use the .Net
validation to create a pop-up-message box instead. Any help would be
greatly appreciated. Thanks.
|
|
 |