470,561 Members | 2,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,561 developers. It's quick & easy.

Master page woes!

Hi folks

Why are master pages such a pain?

I have put a search text box and link button on my master page because I
want it on all pages on my site. After lots of juggling with the different
properties I managed to get it to work.

However, any page which has RequiredFieldValidators fail to submit the
search because it seems to check the required fields have been filled in
(which they won't have been). Anyway, to get around this I put some code
into the page load event..... again I seem to have fallen into another trap
here as the linkbutton doesn't seem to submit the page the first time it is
loaded (which I find strange as DOES submit the page if it has already been
submitted by something else first).

So what can I do to be able to submit a search on a master page and not
trigger the RequiredFieldValidators?

Thanks
Will
Apr 24 '06 #1
2 1377
You need to put your master page stuff in its own ValidationGroup so the
page's validation will ignore it.

Here's more info:
http://SteveOrr.net/articles/Validation.aspx
(Look near the botton for ValidationGroup info)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in message
news:uS****************@TK2MSFTNGP04.phx.gbl...
Hi folks

Why are master pages such a pain?

I have put a search text box and link button on my master page because I
want it on all pages on my site. After lots of juggling with the different
properties I managed to get it to work.

However, any page which has RequiredFieldValidators fail to submit the
search because it seems to check the required fields have been filled in
(which they won't have been). Anyway, to get around this I put some code
into the page load event..... again I seem to have fallen into another
trap here as the linkbutton doesn't seem to submit the page the first time
it is loaded (which I find strange as DOES submit the page if it has
already been submitted by something else first).

So what can I do to be able to submit a search on a master page and not
trigger the RequiredFieldValidators?

Thanks
Will

Apr 24 '06 #2
So that's what validation groups are for!! So simple!

Many thanks.

Will

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:u%******************@TK2MSFTNGP03.phx.gbl...
You need to put your master page stuff in its own ValidationGroup so the
page's validation will ignore it.

Here's more info:
http://SteveOrr.net/articles/Validation.aspx
(Look near the botton for ValidationGroup info)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"William Buchanan" <wi**************@naespamfreenet.co.uk> wrote in
message news:uS****************@TK2MSFTNGP04.phx.gbl...
Hi folks

Why are master pages such a pain?

I have put a search text box and link button on my master page because I
want it on all pages on my site. After lots of juggling with the
different properties I managed to get it to work.

However, any page which has RequiredFieldValidators fail to submit the
search because it seems to check the required fields have been filled in
(which they won't have been). Anyway, to get around this I put some code
into the page load event..... again I seem to have fallen into another
trap here as the linkbutton doesn't seem to submit the page the first
time it is loaded (which I find strange as DOES submit the page if it has
already been submitted by something else first).

So what can I do to be able to submit a search on a master page and not
trigger the RequiredFieldValidators?

Thanks
Will


Apr 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michael Herman \(Parallelspace\) | last post: by
2 posts views Thread by Jon Spivey | last post: by
8 posts views Thread by William Buchanan | last post: by
17 posts views Thread by Rob R. Ainscough | last post: by
4 posts views Thread by Boris Yeltsin | last post: by
6 posts views Thread by =?Utf-8?B?SmF5IFBvbmR5?= | last post: by
2 posts views Thread by =?Utf-8?B?REo=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.