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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top