Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Validator for server control inside a user control.

Reply
Thread Tools

Validator for server control inside a user control.

 
 
=?Utf-8?B?c3VwZXJtYW4=?=
Guest
Posts: n/a
 
      09-04-2006
Hello,

I am facing a strange situation and have already spent a lot of time on
this. I have a user control 'U' that consists of a server/composite control
'C'. C consists of a textbox 'T' and a datepicker 'D' and implements
INamingContainer. The user-selected date from D appears in T. The
validationproperty of C is set to the 'Text' property of T. 'U' also consists
of a RequiredFieldValidator 'R' that validates C (i.e. The text property of
T).

When I use 'U' in an .aspx page, the id of the rendered textbox becomes U:C.
However, the validator R's ControlToValidate property is set to U_C. Thus,
the validation never fires since it is referencing to UniqueID instead of the
ClientID of C.

What am I missing? Any help is appreciated.

Thanks,
superman
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing USER CONTROL which is inside Masterpagethrough Another USER Control inside normal page. Kiran More ASP .Net Web Controls 2 11-14-2006 12:58 PM
Validator for server control inside user control superman ASP .Net Building Controls 3 09-07-2006 09:26 PM
Validator for server control inside user control superman ASP .Net Web Controls 0 09-05-2006 02:45 AM
Custom User Control is not rendered inside another user control in a server table. Leeor Chernov ASP .Net 2 10-16-2005 08:35 AM
Event not firing for user control inside user control vatech1993 ASP .Net 4 12-11-2004 02:51 PM



Advertisments