For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > April 2005 > How to set validator visible by default?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to set validator visible by default?
TomislaW

2005-04-29, 4:01 pm

I would like to set requiredfieldvalidator text property to red '*', but he
is invisible by default, only when I click on button he became visible. I
would like to have him visible by default, before I click button.

Is this possible?


Brock Allen

2005-04-29, 4:01 pm

You could call Page.Validate() from Page_Load when IsPostBack == false. Or
if you just want an individual control to be red, then call YourValidationControl.Validate(),
again from Page_Load when IsPostBack == false;

-Brock
DevelopMentor
http://staff.develop.com/ballen



> I would like to set requiredfieldvalidator text property to red '*',
> but he is invisible by default, only when I click on button he became
> visible. I would like to have him visible by default, before I click
> button.
>
> Is this possible?
>




TomislaW

2005-04-30, 8:59 am

very nice solution
thanx

tomislaw

"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:589591632503735043667088@msnews.microsoft.com...
> You could call Page.Validate() from Page_Load when IsPostBack == false. Or
> if you just want an individual control to be red, then call
> YourValidationControl.Validate(), again from Page_Load when IsPostBack ==
> false;
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com