Link to home
Start Free TrialLog in
Avatar of Overthere
Overthere

asked on

Urgent - Visual Studio Express 2010 and Radio Buttons

Hi folks. I am using ms Visual Studio 2010 Express and have created a a page, test.aspx, that needs to have several radio button. Below is a snippet of one group:
  <tr>
             <td align="right">
                    <asp:Label ID="lblHome" runat="server" Text="Do you own your home?"></asp:Label>
             </td>
             <td >
                   <asp:RadioButton ID="RadHomeYes" runat="server" GroupName="RadHome" Text="Yes" />

                   <asp:RadioButton ID="RadHomeNo" runat="server" GroupName="RadHome" Text="No" />
              </td>
             </tr>

I have a button on the page that executes coding in the test.aspx.vb page that retreives the values of the labels and textboxes. That codign works well.
The PROBLEM is that I can not seem to get the value of the radio button - they aren't required to click on it but I need to know if they did and WHICH one!
Please help as this is urgent.....
ASKER CERTIFIED SOLUTION
Avatar of Mark Franz
Mark Franz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello,

I copied and pasted your code directly into VS 2010, and all worked fine for me in IE, FireFox, and Chrome.  The only thing I can think of trying is try:

If RadHomeYes.Checked = True Then

Probably wont make a difference, but worth a try.


Umm... paulpp, did you even look at my comment?  I believe that is exactly what I suggested.
Avatar of Overthere
Overthere

ASKER

Thanks! I also tried using the "radiolist" and that worked well too. More questions coming! So stay tuned!
Personally, I don't like to use "radiolist" when there are less than three buttons.  But glad to hear it's working.
Sorry mgfranz, when I opened the window the comment wasn't there, and I had the window open for a while until I answered.  No harm meant.