473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Validators and inherited pages (master page)

I am using a base page (I think they're also called master pages) as a
base that my webforms inherit from. The base page controls formating
and common functions used throughout the site. This all works great
until I want to use a validator.

Any validators added to the page do not fire. I can leave a required
textbox blank, and the code happily chugs through processing the
button click code.

After some research, I've found that some say this is a bug with 1.1,
where the validators do not get added back into the page.validators
collection. The solution was to do it yourself in the base page in
the init.

I've done that, and it works, but it causes another problem. My
itemCommand events for my datagrids then stop working.

Any ideas on what the heck is going on here?
Nov 18 '05 #1
1 1260
Hi Shaun:

I'm not sure if this is a bug or not - could you post a small code
example that demonstrates the problem?

Couple things come to mind:

Are you checking Page.IsValid in your event handler? Validators won't
stop the flow of control if the request reaches the server - you have
to check this flag. Are you using client side validation?

--
Scott
http://www.OdeToCode.com

On 13 Aug 2004 11:41:11 -0700, ll*****@gmail.com (Shaun) wrote:
I am using a base page (I think they're also called master pages) as a
base that my webforms inherit from. The base page controls formating
and common functions used throughout the site. This all works great
until I want to use a validator.

Any validators added to the page do not fire. I can leave a required
textbox blank, and the code happily chugs through processing the
button click code.

After some research, I've found that some say this is a bug with 1.1,
where the validators do not get added back into the page.validators
collection. The solution was to do it yourself in the base page in
the init.

I've done that, and it works, but it causes another problem. My
itemCommand events for my datagrids then stop working.

Any ideas on what the heck is going on here?


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
0
by: interuser | last post by:
I have an existing large application that uses validators. I have a problem with the client side validators not working on netscape (and any browser other than IE). As you may already know, the...
5
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...
3
by: Jeff User | last post by:
Hello I am using C#, .net1.1 Vis Studio 2003 I am using homeBase.aspx.cs page as a base for several other aspx/aspx.cs web pages. The base page handles some operations that are common to all...
17
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...
0
by: just.an.imbecile | last post by:
Hello all, Here is a quick version of my problem. I have a website that consists of 4 ASPX pages. Every field is required by default, but on pages 1 and 2, there are several fields that can be...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
1
by: gabe | last post by:
Hi, Is it possible using Web Application Projects with Asp.Net 2.0 Sp1 to have a partial class code behind inherit from a base class that could be used for all the pages on a web site? The...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.