1

I am using radio buttons in my application is there any possible way to shift the text from the left side to right side

Mathew Paul
  • 647
  • 3
  • 16
  • 36

1 Answers1

6

Set the TextAlign property to "Right" on the list it belongs to.

See here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist.textalign.aspx

Example (use a standard WebApplication in VS and include the following in default.aspx):

<asp:RadioButtonList id="RadioButtonList1"
     RepeatDirection="Vertical" 
     RepeatLayout="Table"  
     TextAlign="Right"  
     runat="server">

    <asp:ListItem>Item 1</asp:ListItem>
    <asp:ListItem>Item 2</asp:ListItem>
    <asp:ListItem>Item 3</asp:ListItem>
    <asp:ListItem>Item 4</asp:ListItem>
    <asp:ListItem>Item 5</asp:ListItem>
    <asp:ListItem>Item 6</asp:ListItem>

</asp:RadioButtonList>

The Result

The result for setting TextAlign to Left is:

enter image description here

Alex Duggleby
  • 7,948
  • 5
  • 37
  • 44