473,804 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1281
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.c om (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
1629
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
1165
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 reason is that the validators use document.all which is regognized only by IE's javascript (as opposed to document.getElementById() which is regognized by all browsers.) I do not want to use validators other than dotnet's (it's the standard of...
5
2447
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 web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
3
1792
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 pages. like this: somepage... public class homeBase : System.Web.UI.Page .... then other pages.....
17
3166
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 pages? Kinda sorta a critical point no? Am I missing something? Rob. P.S. the day I find a book that actually is useful rather than just a
0
1110
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 disabled based on answers to questions. (Ex. If they have been at their current address for over two years, then they are not required to fill out the previous address information). It all works great, except that when I go back to page 1 from page...
11
12130
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 http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> This tags are part of the <headelement. Sample code that I have seen shows how to add metatags of the form:
3
5977
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 master page, which both of these child master pages are based on, and in turn the final pages are based on one of these child master pages.
1
1373
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 site uses a Master page, but there are some tasks I'd prefer to be done elsewhere. For example there a couple of common controls in the Master Page that may be used differently by some of the pages. And I'd like to have common code that can call a...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10359
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9177
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6870
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3005
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.