Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Display message when RequiredFieldValidator fired (http://www.velocityreviews.com/forums/t92220-display-message-when-requiredfieldvalidator-fired.html)

Christian Ista 12-06-2004 09:18 PM

Display message when RequiredFieldValidator fired
 
Hello,

I have a form with 5 textbox for each one a RequiredFieldValidator I show
(*) if the field is missing when I post the form.

I'd like when a least one of theses RequiredFieldValidator fired display an
another message (other then ErrorMessage). Is there a way to do that ?

Thanks,



Scott M. 12-06-2004 09:41 PM

Re: Display message when RequiredFieldValidator fired
 
Which is it, you want an asterisk or a message, it can't be both.

"Christian Ista" <ml@cista.be> wrote in message
news:ubduik92EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hello,
>
> I have a form with 5 textbox for each one a RequiredFieldValidator I show
> (*) if the field is missing when I post the form.
>
> I'd like when a least one of theses RequiredFieldValidator fired display
> an another message (other then ErrorMessage). Is there a way to do that ?
>
> Thanks,
>




Ray Costanzo [MVP] 12-06-2004 09:43 PM

Re: Display message when RequiredFieldValidator fired
 
I suggest you display the asterisk next to all the required fields to begin
with in order to "pre-indicate" which fields are required. That's common
practice these days.

Ray at work

"Christian Ista" <ml@cista.be> wrote in message
news:ubduik92EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hello,
>
> I have a form with 5 textbox for each one a RequiredFieldValidator I show
> (*) if the field is missing when I post the form.
>
> I'd like when a least one of theses RequiredFieldValidator fired display

an
> another message (other then ErrorMessage). Is there a way to do that ?
>
> Thanks,
>
>




Christian Ista 12-06-2004 10:06 PM

Re: Display message when RequiredFieldValidator fired
 

> Which is it, you want an asterisk or a message, it can't be both.


That's the point, I'd like both.

An asterisk is displayed next to the field and I'd like an another comment
in an another location.

Thanks,



Curt_C [MVP] 12-06-2004 10:18 PM

Re: Display message when RequiredFieldValidator fired
 
Set the text (between the <> and </>) to * and the Error message to "blah".
Then drop on the summary and on the validator set the Display=Static

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Christian Ista" <ml@cista.be> wrote in message
news:O57pc$92EHA.1564@TK2MSFTNGP09.phx.gbl...
>
>> Which is it, you want an asterisk or a message, it can't be both.

>
> That's the point, I'd like both.
>
> An asterisk is displayed next to the field and I'd like an another comment
> in an another location.
>
> Thanks,
>




Johann MacDonagh 12-07-2004 08:29 AM

Re: Display message when RequiredFieldValidator fired
 
So, you'd like to have an * next to the textbox, but a more helpful error
message somewhere else? That can be accomplished.

The RequiredFieldValidator (as well as the other Validation controls) have
two properties you should be interested in. The first is the ErrorMessage
property, and the second is the Text property. Set the ErrorMessage property
to "This field is required", and the Text property to "*". Then, add a
ValidationSummary control to the top of your form.

If validation errors occur, the Text property ("*") will be the one
displayed next to the TextBox, while the ErrorMessage property will be the
one displayed in the ValidationSummary control.

Hope this helps,
Johann MacDonagh

"Christian Ista" <ml@cista.be> wrote in message
news:ubduik92EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hello,
>
> I have a form with 5 textbox for each one a RequiredFieldValidator I show
> (*) if the field is missing when I post the form.
>
> I'd like when a least one of theses RequiredFieldValidator fired display
> an another message (other then ErrorMessage). Is there a way to do that ?
>
> Thanks,
>





All times are GMT. The time now is 01:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57