Solved

RadioButton Group

Posted on 2014-07-25
3
332 Views
Last Modified: 2014-07-25
The attached image shows some buttons put in a panel control.

Question: Is it possible to modify this button assembly to behave like a set of radiobuttons?

If yes, how what are the changes I need to apply to it?

Thank you.
#btn1, #btn3, #btn5
{
     Height:30px;
     Width:103px;
     margin: 2px auto 0px auto;
}
.
.                
<panel type="radio" name="opt" ID="btnOpt"> 
      <td><asp:Button ID="btn1" Name="opt" runat="server" Text="1" TabIndex="1"   /></td>
      <td><asp:Button ID="btn3" Name="opt" runat="server" Text="3" TabIndex="3"  /></td>
      <td><asp:Button ID="btn5" Name="opt" runat="server" Text="5" TabIndex="5"  /></td>
</panel>

after I revised it to:
 <td><asp:radioButton ID="btn1"  GroupName="cmdOpt" Name="opt" runat="server" Text="1" TabIndex="1"   /></td>
 <td><asp:radioButton ID="btn3"  GroupName="cmdOpt" Name="opt" runat="server" Text="3" TabIndex="3"  /></td>
 <td><asp:Button ID="btn5"  GroupName="cmdOpt" Name="opt" runat="server" Text="5" TabIndex="5"  /></td>

Open in new window

I am getting the second image (radioButton2) where the radio button assembly is functioning but it looses css.
radioButton.png
radioButton2.png
0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40220963
Radio buttons have a check circle beside them, not a number inside a button.  I don't think you can make it look like the first version and act like radio buttons unless you write some javascript to make that happen.
More info here: http://www.w3schools.com/html/html_forms.asp
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40220970
Thanks
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40221009
I don't know C#, I thought it was a javascript problem.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question