RadioButtonList

  • Thread starter Thread starter J
  • Start date Start date
J

J

I have a radioButtonList on an asp.net page, after use clicked 'next' button, I
want to check did user select an answer or not, if yes, jump to next page, if
no, alert user they need to answer it before they click 'next' button. How can I
do this?

Thanks.
 
before you redirect - - (let's say your RadioButtonList is called rbl1) - -
if rbl1.SelectedItem.Text <>"" then
' do your redirect/whatever.
end if

Or - you can give the rbl a default selection, so that either way, something
is selected. - - probably other methods, but this should get you started.

David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
 
Back
Top