Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Validation inside composite controls for ASP .NET 2.0

Reply
Thread Tools

Validation inside composite controls for ASP .NET 2.0

 
 
JorgeDorcasGarcia@hotmail.com
Guest
Posts: n/a
 
      04-10-2006
I'm creating a group of composite controls. Some are more granular than
others, for example, a Zip Code control. The control has a TextBox for
Zip Code, a TextBox for Zip Extension and compare validators for both
of these controls in order to make sure the user enters numeric
information.
If I put this composite control in my page by itself, the client side
validation works perfectly fine, but as soon as I wish to use this
control inside another composite control, like say, an "Address"
control, the client side validation starts to generate javascript
errors at load time, apparently not able to find the controls on the
page, when the page loads in the browser. I am stating inside the Zip
Code composite control that the cvZipCode.ControlToValidate =
txtZipCode.ID. Note, I'm NOT getting a server side error, the error is
on the client side scripting. Is this a bug in the framework? Does this
mean I won't be able to use validation if I go 2 levels deep in my
composite controls? I even tried with one of the MSPress controls
(datepicker) from the book "ASP.NET SERVER CONTROLS AND COMPONENTS" and
it also gives me errors with it.

Any help would be appreciated greatly.

Thanks.

Jorge L. Garcia
Miami, FL

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      04-10-2006
Does your composite control derice from CompositeControl or does it implement
INamingContaner?

-Brock
http://staff.develop.com/ballen


> I'm creating a group of composite controls. Some are more granular
> than
> others, for example, a Zip Code control. The control has a TextBox for
> Zip Code, a TextBox for Zip Extension and compare validators for both
> of these controls in order to make sure the user enters numeric
> information.
> If I put this composite control in my page by itself, the client side
> validation works perfectly fine, but as soon as I wish to use this
> control inside another composite control, like say, an "Address"
> control, the client side validation starts to generate javascript
> errors at load time, apparently not able to find the controls on the
> page, when the page loads in the browser. I am stating inside the Zip
> Code composite control that the cvZipCode.ControlToValidate =
> txtZipCode.ID. Note, I'm NOT getting a server side error, the error is
> on the client side scripting. Is this a bug in the framework? Does
> this
> mean I won't be able to use validation if I go 2 levels deep in my
> composite controls? I even tried with one of the MSPress controls
> (datepicker) from the book "ASP.NET SERVER CONTROLS AND COMPONENTS"
> and
> it also gives me errors with it.
> Any help would be appreciated greatly.
>
> Thanks.
>
> Jorge L. Garcia
> Miami, F



 
Reply With Quote
 
 
 
 
JGarcia
Guest
Posts: n/a
 
      04-10-2006
It derives from CompositeControl, which as far as I know, it implements
the INamingContainer interface.

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      04-10-2006
Yeah, CompositeControl implements it. I was hoping this would be the problem
and thus the quick fix for you. I'll have to go think about it some more
then

-Brock
http://staff.develop.com/ballen


> It derives from CompositeControl, which as far as I know, it
> implements the INamingContainer interface.
>



 
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
Composite Controls and Field Validation Webmills ASP .Net 0 04-21-2006 10:27 AM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
composite controls... Microsoft Press: Dev ASP.NET Server Controls dx ASP .Net 10 04-10-2004 11:33 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM
Client Side Validation and Composite Custom Controls Joel Barsotti ASP .Net Web Controls 0 01-15-2004 12:27 AM



Advertisments