Ask a Question related to ASP.NET General, Design and Development.
-
Navin #1
Going crazy with requiredfieldvalidator controls . Kindly help me
Hello friends...
On a single asp.net web page i have a single server-side form that contains
a couple of user-controls. Each user control has its own functionality and
contains server-side textbox controls, requiredfieldvalidator controls which
validate the textboxes, and a linkbutton control that postbacks the web
page. The problem is, when the user clicks on the linkbutton control on one
user control, the requiredfieldvalidator gets executed for all the user
controls that are present on the page. We only need the
requiredfieldvalidator controls to get executed for the user-control on
which the user clicked the linkbuttons. How can we do this. I have actually
asked this question 3 months back on this newsgroup, and no one actually
answered. I am still struggling to find out how this can be done. Please
help.
Thanks alot
Navin
Navin Guest
-
Kindly Guide
Hi all, I am trying to stream, the media content from flash media server to My WM5.0 SP device/ O2 device.... I am having flash... -
Please- I really need some assistance-thankyou kindly- greatly appreciated
Gazing into my crystal ball I observed "Cekaitah" <wish@dreamsenders.com> writing in news:vsthe.55293$vN2.30509@clgrps13: Do you have a URL? ... -
cfchart and cfchartdata question. Kindly help!
Hello everybody, I really need someone to help me here. I'm new to charting. I'm developing a graphical interface to report the no of jobs logged in... -
scroll bars - kindly go away
Hi there, I ran into this site (don't ask how) and the layout seems to contradict something someone else told me about scroll bars and browser... -
Question about RequiredFieldValidator
I've created a simple form with a submit button and a textfield. I assigned a RequiredFieldValidator to the textfield and set EnabledClientScript... -
S. Justin Gengo #2
Re: Going crazy with requiredfieldvalidator controls . Kindly help me
Navin,
The controls on a page that trigger a post back to the server (like your
button and link controls) trigger client side and server side page
validation to occurr for the entire page their behaviour is designed this
way.
First for any control that should post back to the server that shouldn't
trigger a page validation of any sort I would set it's "CausesValidation"
property to false.
The other controls are going to be difficult if not impossible to use the
way you want with client side validation. You may have to resort to setting
all the button and links on your page to not cause validation and just do
your required field validation on post back. You would do this by calling
the required field validator's "Validate" method server side.
If you need client side validation you may need to write your own javascript
to do so.
I know this isn't what you were hoping to hear, but the validation objects
just weren't created to be split up like that. They work on a form wide
basis and the entire page is one single form...
Sorry,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Navin" <nv@nv.com> wrote in message
news:eGrv8lGVDHA.384@TK2MSFTNGP12.phx.gbl...contains> Hello friends...
> On a single asp.net web page i have a single server-side form thatwhich> a couple of user-controls. Each user control has its own functionality and
> contains server-side textbox controls, requiredfieldvalidator controlsone> validate the textboxes, and a linkbutton control that postbacks the web
> page. The problem is, when the user clicks on the linkbutton control onactually> user control, the requiredfieldvalidator gets executed for all the user
> controls that are present on the page. We only need the
> requiredfieldvalidator controls to get executed for the user-control on
> which the user clicked the linkbuttons. How can we do this. I have> asked this question 3 months back on this newsgroup, and no one actually
> answered. I am still struggling to find out how this can be done. Please
> help.
>
> Thanks alot
>
> Navin
>
>
S. Justin Gengo Guest
-
S. Justin Gengo #3
Re: Going crazy with requiredfieldvalidator controls . Kindly help me
Navin,
I thought of one other possibility.
If a required field validator's "Enabled" property is set to "False" then,
of course, it doesn't stop the page from being posted. Even if the object it
validates doesn't have a value.
I just checked and the validator is still rendered on the page even if it is
not enabled.
You should be able to enable or disable the validators client side depending
on which button holds focus.
This should let you do exactly what you want.
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Navin" <nv@nv.com> wrote in message
news:eGrv8lGVDHA.384@TK2MSFTNGP12.phx.gbl...contains> Hello friends...
> On a single asp.net web page i have a single server-side form thatwhich> a couple of user-controls. Each user control has its own functionality and
> contains server-side textbox controls, requiredfieldvalidator controlsone> validate the textboxes, and a linkbutton control that postbacks the web
> page. The problem is, when the user clicks on the linkbutton control onactually> user control, the requiredfieldvalidator gets executed for all the user
> controls that are present on the page. We only need the
> requiredfieldvalidator controls to get executed for the user-control on
> which the user clicked the linkbuttons. How can we do this. I have> asked this question 3 months back on this newsgroup, and no one actually
> answered. I am still struggling to find out how this can be done. Please
> help.
>
> Thanks alot
>
> Navin
>
>
S. Justin Gengo Guest
-
Navin #4
Re: Going crazy with requiredfieldvalidator controls . Kindly help me
Yes Justin... this last idea that u gave me sounds a little good and I am
testing things out with it.
Thanks for your idea.
"S. Justin Gengo" <sjgengo@aboutfortunate.com> wrote in message
news:%23Alu7GSVDHA.2288@TK2MSFTNGP12.phx.gbl...it> Navin,
>
> I thought of one other possibility.
>
> If a required field validator's "Enabled" property is set to "False" then,
> of course, it doesn't stop the page from being posted. Even if the objectis> validates doesn't have a value.
>
> I just checked and the validator is still rendered on the page even if itdepending> not enabled.
>
> You should be able to enable or disable the validators client sideand> on which button holds focus.
>
> This should let you do exactly what you want.
>
> --
> S. Justin Gengo, MCP
> Web Developer
>
> Free code library at:
> [url]www.aboutfortunate.com[/url]
>
> "Out of chaos comes order."
> Nietzche
> "Navin" <nv@nv.com> wrote in message
> news:eGrv8lGVDHA.384@TK2MSFTNGP12.phx.gbl...> contains> > Hello friends...
> > On a single asp.net web page i have a single server-side form that> > a couple of user-controls. Each user control has its own functionality> which> > contains server-side textbox controls, requiredfieldvalidator controls> one> > validate the textboxes, and a linkbutton control that postbacks the web
> > page. The problem is, when the user clicks on the linkbutton control on> actually> > user control, the requiredfieldvalidator gets executed for all the user
> > controls that are present on the page. We only need the
> > requiredfieldvalidator controls to get executed for the user-control on
> > which the user clicked the linkbuttons. How can we do this. I have>> > asked this question 3 months back on this newsgroup, and no one actually
> > answered. I am still struggling to find out how this can be done. Please
> > help.
> >
> > Thanks alot
> >
> > Navin
> >
> >
>
Navin Guest



Reply With Quote

