Click here to Skip to main content
Sign Up to vote bad
good
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 - 21:18
Edited 25 Dec '12 - 21:45

Comments
Sergey Alexandrovich Kryukov - 26 Dec '12 - 3:31
Why? Is it for right-to-left writing systems? Otherwise, unusual location of text will only confuse the users... —SA
Armando Talex - 26 Dec '12 - 3:52
Do you want to show the radio buttons in the left and the text are at the right of the radio buttons or The text are in the left and the radio buttons in the right of the text?

5 solutions

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  
set textalign property
  Permalink  
use TextAlign properties of radiobuttonlist control
  Permalink  
use TextAlign properties of radiobuttonlist control
  Permalink  
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 498
1 Arun Vasu 275
2 Maciej Los 273
3 Mahesh Bailwal 264
4 Aarti Meswania 175
0 Sergey Alexandrovich Kryukov 9,660
1 OriginalGriff 7,329
2 CPallini 3,968
3 Rohan Leuva 3,339
4 Maciej Los 2,851


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid