This is not a job for the RequiredFieldValidator.
You need to write a CustomValidator that checks the status of the
RadioButton and then the status of the TextBox.
Create a client-side JavaScript function in the .aspx page and tell your
CustomVaildator control that this is the function to use. You'll also need
to create a similiar server-side vb sub for the validation controls
servervalidate event.
"Reddy" <an*******@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Hi!,
I have Two Radiobuttons and a TextBox to write comments.
If RadioButton1 is on Comment must be entered in a textbox.
If RadioButton2 is on Comments are not necessary.
I am using the required field validator for textbox. But it's not working
as i wanted. How can i write client script in this scenario. Anybody please
help me how to write.
Thank You
Reddy