473,320 Members | 1,707 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,320 software developers and data experts.

Custom validation problem with Radiobuttonlist

This is a strange one. My custom validator function is executing onclick (or onclientclick) of my radiobuttonlist, instead of when I click on my submit button. Autopostback is set to false, so I'm extremely confused. When I run the app and click on one of the status list items, it is calling the executing the ValidateRBLStatus javascript method (I have a breakpoint set in VS2008).

Expand|Select|Wrap|Line Numbers
  1.             <asp:RadioButtonList ID="rblStatus" runat="server" RepeatDirection="Vertical" RepeatColumns="1" AutoPostBack="false">
  2.             <asp:ListItem Text="1" Value="1"></asp:ListItem>
  3.             <asp:ListItem Text="2" Value="2"></asp:ListItem>
  4.             <asp:ListItem Text="3" Value="3"></asp:ListItem>
  5.             </asp:RadioButtonList>
  6.  
  7.             <asp:CustomValidator ID="rfvStatus" runat="server" EnableClientScript="true" ControlToValidate="rblStatus" ErrorMessage="This field is required." 
  8.             ClientValidationFunction="ValidateRBLStatus" Display="Dynamic"></asp:CustomValidator>
  9. <asp:TextBox ID="tbC" runat="server"></asp:TextBox><br />
  10.             <asp:CustomValidator ID="rfvCitizenshipCountry" runat="server" 
  11.             EnableClientScript="true" ControlToValidate="tbC" ErrorMessage="This field is required." ClientValidationFunction="ValidatetbC" Display="Dynamic"></asp:CustomValidator>
  12.  
Oct 5 '10 #1
1 3004
mzmishra
390 Expert 256MB
remove ControlToValidate="rblStatus" see if there is any change.
Oct 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: charliewest | last post by:
Is it possible to use the custom validation control to validate a calendar control via client-side script (in jscript)? I'm familiar with custom validation and client side script, and i am aware...
2
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post...
1
by: Stephen Adam | last post by:
Hi there, I have written a custom validation control which checks to see of an input field is not empty and contains only numeric data. I was using a regular expression validation control but...
2
by: Andre | last post by:
I've set up a CustomValidator control which has both a client side and server side function associated with it. My server side function never seems to be called as long as I have the...
5
by: Mattyw | last post by:
Hi, I'm relatively new to Web Forms, I have been using Required Field Validators and Regular Expression Validators on a Web Form I am developing and everything works as expected using Visual...
3
by: Jaime Stuardo | last post by:
Hi everybody... I am testing custom validation in a test ASPX page and it isn't working. I followed a tutorial but when I compiled the code, the field isn't validated. The tutorial says that I...
4
by: kpg | last post by:
I can't get the CustomValidator (CV) ErrorMessage to display in the ValidationSummary. On the same page I have several RequiredField Validators and a Range Validator, that all work just fine,...
1
by: Tarscher | last post by:
Hi all, I have a custom validation on server side (I disabled client side). The validation is inside a user control but doesn't seem to work. For simplifying things I took out almost all code of...
1
by: Fendi Baba | last post by:
I wrote a simple validation routine. I am trying to trigger validation on group of fields if an option on another radio button is selected. Sub ValidateAdd_ServerValidate(ByVal objSource As...
1
gagandeepgupta16
by: gagandeepgupta16 | last post by:
Hi I am working on an entry form using validation controls in ASP.NET. I have two controls which requires custom validators, no issue in using plain custom validators. But when i am using...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.