|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Validation inside composite controls for ASP .NET 2.0others, 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 Does your composite control derice from CompositeControl or does it implement
INamingContaner? -Brock http://staff.develop.com/ballen Show quoteHide quote > 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 It derives from CompositeControl, which as far as I know, it implements
the INamingContainer interface. 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 Show quoteHide quote > It derives from CompositeControl, which as far as I know, it > implements the INamingContainer interface. >
One page - edit & insert
return url value Display a record - several questions Show ***** only if have a password How do I debug apsx pages? using 'sender' object on event fires FormView - initial template problem traping event in child control must click button twice for event to fire Gridview can't format a date |
|||||||||||||||||||||||