Home All Groups Group Topic Archive Search About

Validations for dynamic radiobuttons -- Please help

Author
6 Apr 2005 4:03 PM
Mike Asp via DotNetMonster.com
Hi ! I have several dynamic radiobuttons on form like  For each question i
have 3 radio buttons (Yes, No, May be)  . I need two types of validations. 
1. If user selects (No) then it should give some alert saying enter some
text in explanation box.
2. User cannot miss any question.
I have been trying past 2 weeks. No luck
I really appreciate your help.
Thanks.

--
Message posted via http://www.dotnetmonster.com

Author
6 Apr 2005 5:32 PM
Brock Allen
Sounds like you'll need to use a <asp:CustomValidator>. This means you'll
need to write the validation login in an event on your server (C# or VB.NET
code). Also, you can optionally write a javascript validation function that
will run in the client browser. The docs show a sample:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsCustomValidatorClassTopic.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> Hi ! I have several dynamic radiobuttons on form like  For each
> question i
> have 3 radio buttons (Yes, No, May be)  . I need two types of
> validations.
> 1. If user selects (No) then it should give some alert saying enter
> some
> text in explanation box.
> 2. User cannot miss any question.
> I have been trying past 2 weeks. No luck
> I really appreciate your help.
> Thanks.
Author
7 Apr 2005 5:24 PM
Mike Asp via DotNetMonster.com
Brock,

Thanks for quick response.  I will try.

--
Message posted via http://www.dotnetmonster.com