Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CustomValidation

Reply
Thread Tools

CustomValidation

 
 
SAI
Guest
Posts: n/a
 
      07-12-2005
Should I bind one of the controls to the CustomValidation Object? e.g. bind
text box to it. In some cases, I may need to check 2 web object contents.
How to do it in one CustomValidation Object?

I tried to bind a text box to CustomValidation Object and set the Client
Validation to TRUE. Then I write a javascript to validate. It is no any
action about the checking. Any suggestion? thanks.


 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      07-12-2005
You don't bind controls to validators...if you mean use the
"ControlToValidate" you can leave it blank in the case of custom
validator....in custom validator on the client side, you need to get a
reference to the control yourself:

function Validate(src, args)
{
var txt = document.getElementById("myTextbox");
if (txt.value == "")
{
args.IsValid = false;
}
}

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"SAI" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Should I bind one of the controls to the CustomValidation Object? e.g.
> bind text box to it. In some cases, I may need to check 2 web object
> contents. How to do it in one CustomValidation Object?
>
> I tried to bind a text box to CustomValidation Object and set the Client
> Validation to TRUE. Then I write a javascript to validate. It is no any
> action about the checking. Any suggestion? thanks.
>
>



 
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
newbie seeks CustomValidation advice/problem solving... =?Utf-8?B?SWxsdXN0cmlz?= ASP .Net 3 09-10-2005 05:10 PM
Javascript question on customvalidation gane kol ASP .Net 3 04-15-2005 03:00 PM
ASP.NET CustomValidation Won't be fired. zlusca@gmail.com ASP .Net 1 03-26-2005 05:35 PM
datagrid template columns and customvalidation =?Utf-8?B?cm9kY2hhcg==?= ASP .Net 2 01-11-2005 04:29 PM
Control Tab Movement in CustomValidation Script kpg ASP .Net 2 12-22-2004 05:48 PM



Advertisments