Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Web User Control with CustomValidation and Javascript

Reply
Thread Tools

Web User Control with CustomValidation and Javascript

 
 
Craig Buchanan
Guest
Posts: n/a
 
      08-18-2008
I have a Web User Control (.ascx file) that I need to valid using a
CustomValidation control. Moreover, I would like use client and server
validation, if possible. I have the logic for the server-side validation
working correctly. I also have the have the client-side validation working
once the control is embedded in a page. I would like to move the validation
from the aspx page to the ascx page, but I'm concerned that the
GetElementById() method will have an issue.

A couple of questions:
* can I build Javascript coding into the ascx page in a way that it will
work correctly however the control is embedded?
* can I switch between server and client validation programmatically,
meaning disable on mechanism and enable another?

Any thoughts would be appreciated. Thank you.

Craig buchanan


 
Reply With Quote
 
 
 
 
Peter Bucher [MVP]
Guest
Posts: n/a
 
      09-10-2008
Hi Craig

> GetElementById() method will have an issue.

What kind of issues?

> A couple of questions:
> * can I build Javascript coding into the ascx page in a way that it will
> work correctly however the control is embedded?

Yes of course

> * can I switch between server and client validation programmatically,
> meaning disable on mechanism and enable another?

Yes

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

 
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
Web User Control with CustomValidation and Javascript Craig Buchanan ASP .Net 1 09-10-2008 11:29 AM
Web User Control with CustomValidation and Javascript Craig Buchanan ASP .Net Building Controls 1 09-10-2008 11:29 AM
CustomValidation Control =?Utf-8?B?Ym9iYnk=?= ASP .Net 1 09-13-2007 07:14 AM
Javascript question on customvalidation gane kol ASP .Net 3 04-15-2005 03:00 PM
Control Tab Movement in CustomValidation Script kpg ASP .Net 2 12-22-2004 05:48 PM



Advertisments