Right Align Textbox/label

Discussion in 'ASP .Net' started by Wardeaux, Nov 12, 2004.

  1. Wardeaux

    Wardeaux Guest

    I need to right align the text in a textbox (or label) in my ASP.NET app...
    Any clues best way to accomplish this?
    MTIA
    wardeaux
     
    Wardeaux, Nov 12, 2004
    #1
    1. Advertising

  2. Hi Wardeaux,

    Use the align or HorizontalAlign property of the tag that contains the
    textbox:

    <p align='Right'>
    <td align='Right'>
    <asp:TableCell HorizontalAlign='Right'>

    Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "Wardeaux" <> wrote in message
    news:...
    > I need to right align the text in a textbox (or label) in my ASP.NET

    app...
    > Any clues best way to accomplish this?
    > MTIA
    > wardeaux
    >
    >
     
    Ken Dopierala Jr., Nov 12, 2004
    #2
    1. Advertising

  3. Wardeaux

    Ian Suttle Guest

    Wardeaux,

    The best way to handle it is probably through the use of CSS. Try
    using the text-align element to define the alignment.
    Thanks,
    Ian Suttle
    http://www.IanSuttle.com
     
    Ian Suttle, Nov 12, 2004
    #3
  4. txtPay.Attributes.CssStyle.Add("TEXT-ALIGN","right");

    vinay


    "Wardeaux" wrote:

    > I need to right align the text in a textbox (or label) in my ASP.NET app...
    > Any clues best way to accomplish this?
    > MTIA
    > wardeaux
    >
    >
    >
     
    =?Utf-8?B?dmluYXk=?=, Nov 12, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kai
    Replies:
    3
    Views:
    25,440
  2. Bogdan
    Replies:
    1
    Views:
    856
    Bogdan
    Jun 16, 2009
  3. Tony Johansson
    Replies:
    1
    Views:
    1,894
    Brian Cryer
    Jun 14, 2011
  4. Lee Trotter

    Align Label Text Right

    Lee Trotter, Jun 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    301
    DalePres
    Jun 12, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    335
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page