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

User Controls & Validation

Environment: Visual Studio 2005 + WinXP Pro SP2 + .NET 2.0

I am new to creating user controls and have a (hopefully) simple question.

I have a series of personal questions (first/last name, address, phone
number, etc.) that is repeated on several different pages. I pulled
these question out into a UserControl to make it easier to maintain, etc.

One problem... How do I specify validation logic for the controls
contained in the UserControl?

I currently have a Validation Summary (ValidationGroup = "Personal") at
the top to the UserControl and have a bunch of Validators defined on the
different fields (each with their ValidationGroup = "Personal" ). I then
created a test page that contained the UserControl, loaded it, and
clicked the 'submit' button I created (with CausesValidation = "true").
I do not receive any validation error messages despite the form being
empty and having several required fields.

Any ideas on how to resolve this issue? As I said, I am new to UserControls.

Thanks,

-={ Kyle }=-
Aug 30 '06 #1
1 1110
I still haven't figured this out. Can anyone be of assistance?

Could it be related to having the ViewState disabled?

-={ Kyle K }=-

Kyle K. wrote:
Environment: Visual Studio 2005 + WinXP Pro SP2 + .NET 2.0

I am new to creating user controls and have a (hopefully) simple question.

I have a series of personal questions (first/last name, address, phone
number, etc.) that is repeated on several different pages. I pulled
these question out into a UserControl to make it easier to maintain, etc.

One problem... How do I specify validation logic for the controls
contained in the UserControl?

I currently have a Validation Summary (ValidationGroup = "Personal") at
the top to the UserControl and have a bunch of Validators defined on the
different fields (each with their ValidationGroup = "Personal" ). I then
created a test page that contained the UserControl, loaded it, and
clicked the 'submit' button I created (with CausesValidation = "true").
I do not receive any validation error messages despite the form being
empty and having several required fields.

Any ideas on how to resolve this issue? As I said, I am new to
UserControls.

Thanks,

-={ Kyle }=-
Sep 12 '06 #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: 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...
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 -...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.