Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

easy question about radiobutton.

Posted on 2008-10-30
10
Medium Priority
?
186 Views
Last Modified: 2013-11-08
I need to have man and women on the same line
<asp:RadioButtonList ID="GrpGender" runat="server" RepeatDirection="Horizontal"
                RepeatColumns="2">
            <asp:ListItem Text="Male" Selected="True" Value="M">
            </asp:ListItem>
            <asp:ListItem Text="Women" Value="F"></asp:ListItem>
        </asp:RadioButtonList>
what should I do?
0
Comment
Question by:mathieu_cupryk
[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
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22847322
What is not showing correctly with what you have?  That appears to be the correct code to put them on same line.  Only thing I would suggest is be consistent with verbiage.  Either Man | Woman OR Male | Female.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22847347
Maybe you are talking about the look and feel of it.  Try using the Flow layout instead of Table.
<asp:RadioButtonList ID="GrpGender" runat="server" 
            RepeatDirection="Horizontal" RepeatLayout="Flow">
            <asp:ListItem Text="Man" Selected="True" Value="M" />
            <asp:ListItem Text="Woman" Value="F" />
        </asp:RadioButtonList>

Open in new window

0
 

Author Comment

by:mathieu_cupryk
ID: 22847411
i gives me this
I am *  
Man

Woman


I want
I am* [] Man [] Women
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22847440
I just tried it the way I posted and comes out on same line.  Maybe you have something wrapping the line.  Check design code for width restrictions.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22847441
Post the snippet of code for that entire section including any surrounding DIV tags, etc.
0
 
LVL 6

Expert Comment

by:M3mph15
ID: 22847459
Hi,

I would create 2 seperate radio buttons side by side and when one is clicked on the CheckedChanged uncheck the other radio button.

E.g.
Protected Sub RadioButton1_CheckedChanged() Handles RadioButton1.CheckedChanged
      If RadioButton1.Checked Then
                 RadioButton2.Checked = False
      End If
End Sub

Hope this helps
-M3mph15
0
 

Author Comment

by:mathieu_cupryk
ID: 22847477
<tr>
        <td class="label" align="left" height="25"><b>I am *</b>&nbsp;</td>
     
        <td class="">
        <asp:RadioButtonList ID="GrpGender" runat="server"
            RepeatDirection="Horizontal" RepeatLayout="Flow" Width="215px">
            <asp:ListItem Text="Man" Selected="True" Value="M" />
            <asp:ListItem Text="Woman" Value="F" />
        </asp:RadioButtonList>

        </td>
    </tr>

30-10-2008-10-39-13-PM.png
0
 
LVL 5

Expert Comment

by:varungd
ID: 22847635
Increase the width of that radio button
0
 
LVL 5

Expert Comment

by:varungd
ID: 22847638
Otherwise increase the table width
0
 
LVL 6

Accepted Solution

by:
AmarIs26 earned 2000 total points
ID: 22850160
you need to increase the width of the cell (<td>) that the radio buttons are in.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

721 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