Click here to Skip to main content
11,487,406 members (71,593 online)
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 Sergey Alexandrovich Kryukov 9,193
1 OriginalGriff 8,287
2 Sascha Lefèvre 3,334
3 Maciej Los 2,946
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2015
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