473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CustomValidation

SAI
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.
Nov 19 '05 #1
1 1471
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" <te**@test.com> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
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.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: philipl | last post by:
hi, i have a datagrid which display custom controls when user clicks edit, changing data. I am using customvalidator to validate this control. I can get validation of user input to work no...
2
by: rodchar | last post by:
hey all, I'm not sure if this is even possible but here goes: if i put a CustomValidator control in my EditItem template column how do i get to it? Or how and where do i write my custom code for...
2
by: kpg | last post by:
Hi all, This should be simple... I have a TextBox1 and a customvalidation control linked to it. I use a client side script to validate the textbox. If the data is not valid I want to return...
1
by: zlusca | last post by:
Hi, guys I have asp.net form contain several textbox controls and one field is userName I want to validate this field to make sure there is no other user have the same userName before saving. so...
5
by: gane kol | last post by:
Hi I have a set of Yes/No radio buttons with textboxes for each. I need to write a common customvalidation function that checks, if radiobutton "yes" is selected, the value in the corresponding...
0
by: sarithap | last post by:
Hi, I am working on Datagrids and am running into an issue. In my Datagrid I have a template column which has 10 text boxes in it. And I need to make sure that atleast one of the text boxes in...
1
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
I have a drop down list in my asp page. when I selectg an irem and click on a button it appears in the Grid view. But when I again come to the same page and click on the same item from Drop down...
1
by: Craig Buchanan | last post by:
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...
2
JustRun
by: JustRun | last post by:
Hi, I'm developing a web application using ASP.NET2.0 with C#, I have tried to use custom validation controls to validate my forms, it worked very well in the English language , but when i test it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.