Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
hi

I used Radiobutton list in my page
 
<asp:RadioButtonList ID="rblDirections" runat="server" RepeatDirection="Horizontal">         <asp:ListItem Text="East" Value="East"><asp:ListItem Text="West" Value="West"><asp:ListItem Text="North" Value="North"><asp:ListItem Text="South" Value="South"> 

 

 
I want text of each itemlist be at the right of radiobutton

here text are at the left .

how i can do it?

thanks alot
Posted 25-Dec-12 22:18pm
Edited 25-Dec-12 22:45pm
v2
Comments
Sergey Alexandrovich Kryukov at 26-Dec-12 3:31am
   
Why? Is it for right-to-left writing systems? Otherwise, unusual location of text will only confuse the users...
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If you want to change the place where the text should be displayed (either left or right) of the radio button. You can use text align Property of asp:RadioButtonList.
 
Change it from Left or Right.
 
<asp:radiobuttonlist id="rblDirections" xmlns:asp="#unknown">
runat="server" RepeatDirection="Vertical" 
TextAlign="Left">
                <asp:listitem text="East" value="East" />
                    <asp:listitem text="West" value="West" />
                        <asp:listitem text="North" value="North" />
                            <asp:listitem text="South" value="South" />
            </asp:radiobuttonlist>
 
Hope this Helps.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

set textalign property
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

use TextAlign properties of radiobuttonlist control
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

use TextAlign properties of radiobuttonlist control
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Hi,
 
use like this
<asp:RadioButtonList ID="rblDirections" runat="server" RepeatDirection="Horizontal" TextAlign="Left">
<asp:ListItem Text="East" Value="East"></asp:ListItem>
<asp:ListItem Text="West" Value="West"></asp:ListItem>
<asp:ListItem Text="North" Value="North"></asp:ListItem>
<asp:ListItem Text="South" Value="South">
</asp:ListItem></asp:RadioButtonList>
 

Thanks
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 285
1 Zoltán Zörgő 170
2 OriginalGriff 140
3 Sergey Alexandrovich Kryukov 120
4 Maciej Los 115
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100