Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

I used Radiobutton list in my page

C#
<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
Updated 25-Dec-12 21:45pm
v2
Comments
Sergey Alexandrovich Kryukov 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
[no name] 26-Dec-12 3:52am    
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?

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.

C#
<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.
 
Share this answer
 
set textalign property
 
Share this answer
 
use TextAlign properties of radiobuttonlist control
 
Share this answer
 
use TextAlign properties of radiobuttonlist control
 
Share this answer
 
Hi,

use like this
XML
<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
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900