Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   usercontrol and clientside validation (http://www.velocityreviews.com/forums/t756309-usercontrol-and-clientside-validation.html)

Ken 01-09-2004 06:29 PM

usercontrol and clientside validation
 
Hi there,
I have a usercontrol and i have written sone clientside
validation script associated along with it. Now when i
register this usercontrol in the mainwebform, how can i
access the clientside validation to validate the
usercontrol?

Thanks in advance

-K

psb 01-14-2004 12:06 AM

Re: usercontrol and clientside validation
 
if i know I will never add any more controls to the page I will let the page
render. then I will look at the source. your elements will have id's like
"_ctl45_txbZipCode" or "_ctl45_txbName". I would then use these as the name
to validate against...

if (document.Form1['_ctl45_txbName'].value.length == 0) return false;

**NOTE: if you add controls to the page the "ctl45" may change to "ctl46"
and so on. so when updateing the page, make sure the javascript validation
code works.

whatever. sorry if this is not what you are talking about....

-psb

"Ken" <anonymous@discussions.microsoft.com> wrote in message
news:01c101c3d6de$8fe773e0$a301280a@phx.gbl...
> Hi there,
> I have a usercontrol and i have written sone clientside
> validation script associated along with it. Now when i
> register this usercontrol in the mainwebform, how can i
> access the clientside validation to validate the
> usercontrol?
>
> Thanks in advance
>
> -K





All times are GMT. The time now is 02:08 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.