how to get validation for radiobutton binded in listview?

Posted by Prasuna under ASP.NET on 5/10/2011 | Points: 10 | Views : 1818 | Status : [Member] | Replies : 1
Im using radiobutton and binding the data from database to that rbt...but im unable to validate it..i need to get an validation that select alteast one rbt.
so please help me




Responses

Posted by: Prabhakar on: 5/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Prasuna . .


where u want to validate it. . . if u want to on Button_Click event so write this
code ..

if (rbt.SelectedIndex == -1)

{
lblberro.Text = "Please Select Rbt !";

return;

}
else
{
lblberro.Text = "";
}


Best Regard's
Prabhakar

Prasuna, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response