473,486 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1461
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2397
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
2
1732
by: Jon Spivey | last post by:
Hi, Using VS 2005/VB.net. I need to add a meta description tag and change a stylesheet link from a page based on a master page. Found this article...
8
1403
by: William Buchanan | last post by:
Hi folks I have a "Search" text box and LinkButton in my master page. When this is submitted, I do a Server.Transfer to a page which contains a gridview. The gridview is filtered on a hidden...
3
6393
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
17
3133
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
2
6907
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no...
4
3959
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: ...
6
9115
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
2
5516
by: =?Utf-8?B?REo=?= | last post by:
I have a peculiar problem here that I did not have until I migrated from ASP.NET 2.0 to 3.5. I use a master page for my application. Because the master page uses update panels I have the...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.