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

ASP.NET User Control Validation ???

I have created a user control containing a drop down list box. I want
to be able to put this user control onto a page along with a validator
control. The problem is, the validator doesn't see the usercontrol as
a "validatable" object. I don not want to include the validator in the
user control because then the type of validator, and its location with
respect to the ddlb, is fixed (unless I do more coding to try and
accomodate all possible configurations, which I don't want to do).

I have tried various ways of making this work over the last 2 days
without success. This seems to me a bit ridiculous that this isn't as
easy as Page.RegisterControlForValidation() or something along those
lines.

Has anyone ever figures out a way around this problem?

Any help is much appreciated.

Jul 12 '07 #1
1 1558
been a while since ive messed with this problem. here are some things
to try.

give your new UserControl a ToString() method.

verify the containing page is actually posting back, UserControl post
back doesnt automatically mean the page is posting back.

if all else fails, you can always manually trigger the page's
validation.

Jul 12 '07 #2

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

Similar topics

2
by: buran | last post by:
Dear ASP.NET Programmers, I have a web user control (a search menu) which has 2 validation controls (one for input and another for the search criterion). I am including this search user control...
2
by: Martin | last post by:
Hi, I have a page with 4 web user controls on. Each of these web user controls has some asp.net controls on that have validation events attached to them. Now because there are 4 seperate...
2
by: c676228 | last post by:
Hi, I have several user controls like email, phone,ssn etc. each has it's own validation message in its user control already. When I bring all those user controls in an aspx page, I would like to...
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...
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...
3
by: David Davis | last post by:
I cannot get a web user control to validation client-side using a required field validator. It only validates server side. I have a web user control in .net 2.0. I have a single text box on it....
2
by: jamesd | last post by:
I have a user control that has some simple textboxes. The user control is placed into a regular webform with a submit button on it. When the submit button is clicked, the form is posted to the...
0
by: dhurwitz | last post by:
Hi, In my ASP.NET 2.0 web app, I have a user control, ucBinEdges, with several text boxes. The user control has several validation controls validating the Text of these text boxes -...
2
by: moondaddy | last post by:
asp.net 2.0 I have a page with a tab control on it. Each tab has a different user control on it. each user control is used for different data entry (like separate data entry forms) and has its...
2
by: msch.prv | last post by:
Is there a specific method to disable field validators in a user control.from within a parent page or does it require an ad hoc approach? The page attribute ValidateRequest does not seem to be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.