473,387 Members | 1,391 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,387 software developers and data experts.

RequiredFieldValidators and user control required fields?

Hi,
I'm using .NET 1.1 and wondering if I can use RequiredFieldValidators with
required fields inside user controls.

The page is a type of tabbed panel layout with the divs show/hidden using
javascript. Depending on which tab panel is visible upon the submit, I want
to execute the appropriate javascript validation.

When I submit the form, is there a way to conditionally check or fire the
requiredfieldvalidators? Do you place the regfieldvalidator on the .aspx and
reference the control to validate as Control:FormField?

I can write the js to validate manually but was wondering if there is a
slick way of doing this. Thanks.
Apr 6 '06 #1
1 1855
Dave,

You'll have to write a bit of javascript yourself because of the way your
are hiding/showing your tabs. If you'd used panels so that the various
unseen sections weren't actually there in code on the page then the required
field validators would work out of the box for you. But using panels would
require post backs each time one is switched to.

The required field validators all have an enabled property when created
client side. You should be able to set each control's enabled value to true
or false based on your tab change.

Regards,

Justin


"Dave" <Da**@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
Hi,
I'm using .NET 1.1 and wondering if I can use RequiredFieldValidators with
required fields inside user controls.

The page is a type of tabbed panel layout with the divs show/hidden using
javascript. Depending on which tab panel is visible upon the submit, I
want
to execute the appropriate javascript validation.

When I submit the form, is there a way to conditionally check or fire the
requiredfieldvalidators? Do you place the regfieldvalidator on the .aspx
and
reference the control to validate as Control:FormField?

I can write the js to validate manually but was wondering if there is a
slick way of doing this. Thanks.

Jun 5 '06 #2

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

Similar topics

1
by: Kris van der Mast | last post by:
Hi, been a while since I posted a question myself instead of trying to help others out. I'm refactoring an existing web app that uses dynamic loading of user controls and a lot of...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
0
by: Gunjan Garg | last post by:
The issue here is - When the postback event happens the selected index is always returing the first value. Appreciate your help in advance. Thanks Here is the code...
2
by: Robin | last post by:
In a form with a number of RequiredFieldValidators, how do you include a cancel button so that you don't get errors when cancelling on a pge with required fields left blank? Thanks.
3
by: c676228 | last post by:
Hi all, If I developed a phone user control which has requiredfieldvalidator, regularexpressionvalidator etc. The quesiton is if on a web form which have three phone fields and only any one of...
8
by: MattB | last post by:
I have a asp.net 1.1/vb application that has a page with a bunch of dynamically added User Controls. When I add the controls, I set the UserControl.EnableViewState to true. For all my controls...
2
by: ticars | last post by:
I have a telephone number user control in which I need to validate the data entered (Required field validation and regular expression validation). The phone number is represented as 3 text boxes...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
1
by: | last post by:
We are using RequiredFieldValidators for username & password textboxes on a registration page where the user creates a login. We also have a link that directs the user directly to the login page...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.