473,327 Members | 2,103 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,327 software developers and data experts.

CustomValidator in Repeater

Hi,

I have a Repeater where each row (Repeater item) contains a Checkbox and two
Textboxes. The first Textbox has a RequiredFieldValidator and everything work
fine. The other should only validate if the Chekbox is checked. To achieve
this I've added a CustomValidator, set the ControlToValidate to the id of the
Textbox and set a OnServerValidate handler. But once the OnServerValidate
code behind method fires I can't find a good solution on how to find the
checkbox in that Repeater item.

Any ideas?

protected void valReqErrorMessage_ServerValidate(object source,
ServerValidateEventArgs args)
{
//Only validate args.Value if "chb" is selected ... ?
}

Thanks in advance

Richard
Apr 24 '06 #1
0 2372

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

Similar topics

7
by: jcpmeticulus | last post by:
Hi I've spent the last day or so debugging a problem with a CustomValidator and am now totally stumped! Basically I use a number of CustomValidator's on my page, but have cut this down now to...
1
by: bill yeager | last post by:
I'm using the customvalidator in my web page. I get the following error when I try to run the web page: Unable to find control id 'lstRider' referenced by the 'ControlToValidate' property of...
2
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple text box and button that did a Full-text Search of a...
3
by: Ronan Dodworth | last post by:
Hi there I'm having a little bit of a problem with my customvalidator control. The problem is the javascript runs fine on my local webserver IIS but not when I post it to the web hosting server....
1
by: SMG | last post by:
Hi All. My forms has two textboxes, 1 username, 2 password. Both has requiredfield validator it works fine when there is no input in these textboxes. And the errorMsg is shown in...
0
by: ghafranabbas | last post by:
This is how you use the customvalidator control in any INamingContainer interface control (Datagrid, DataList, DataRepeater, etc). 1. In the ItemTemplate, place your customvalidator 2. Set the...
1
by: Beffmans | last post by:
Hi I have defined an customvalidator on my TextBox: function clientvalidate(source, arguments){ { // even number? if (arguments.Value%2 == 0) arguments.IsValid = true; else
1
by: David | last post by:
I need help with CustomValidator in 1.1. I added the CustomValidator control and code as per the doc., (See below) However, the code is never executed. Is there an extra switch or setting to...
2
by: Jeff | last post by:
hey net 3.5 I have problem with a customvalidator. I enter values into the TextBox named "txt" and clicks on the save button (ibSave) then the TestValidate method get triggered. TestValidate...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.