Home All Groups Group Topic Archive Search About

What happened to Alignment property?

Author
13 Jun 2005 3:29 PM
Rob R. Ainscough
I'm working on an ASP.NET with VB.NET web application (Web Forms) and I
can't find an Alignment property for the TextBox nor the Label control?
What am I missing?

Thanks, Rob.

Author
13 Jun 2005 6:05 PM
Mythran
"Rob R. Ainscough" <roba***@pacbell.net> wrote in message
news:%239fxrxCcFHA.1152@tk2msftngp13.phx.gbl...
> I'm working on an ASP.NET with VB.NET web application (Web Forms) and I
> can't find an Alignment property for the TextBox nor the Label control?
> What am I missing?
>
> Thanks, Rob.
>


In ASP.Net, you would use styles or stylesheets to control text alignment
(see text-align attribute).

Programatically:
TextBox1.Attributes.Add("text-align", "right")

Style:

..MyCSSClass {
    text-align : right;
}

Mythran
Author
13 Jun 2005 8:46 PM
Rob R. Ainscough
Thank you for the response.

I must admit, tasks that are VERY simple to accomplish in VB.NET Windows
applications are considerably more code intensive under ASP.NET.  I keep
trying to convience myself that I'm not moving backwards in development
technology when it comes to Web application development -- there must be a
better way.

But thanks again for your help.

Rob.


Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message
news:%23O7o%23JEcFHA.2180@TK2MSFTNGP12.phx.gbl...
>
> "Rob R. Ainscough" <roba***@pacbell.net> wrote in message
> news:%239fxrxCcFHA.1152@tk2msftngp13.phx.gbl...
>> I'm working on an ASP.NET with VB.NET web application (Web Forms) and I
>> can't find an Alignment property for the TextBox nor the Label control?
>> What am I missing?
>>
>> Thanks, Rob.
>>
>
>
> In ASP.Net, you would use styles or stylesheets to control text alignment
> (see text-align attribute).
>
> Programatically:
> TextBox1.Attributes.Add("text-align", "right")
>
> Style:
>
> .MyCSSClass {
>    text-align : right;
> }
>
> Mythran
>
Author
14 Jun 2005 4:42 PM
Rob R. Ainscough
Hmmm...this doesn't appear to work?  What am I missing?

Rob.


Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message
news:%23O7o%23JEcFHA.2180@TK2MSFTNGP12.phx.gbl...
>
> "Rob R. Ainscough" <roba***@pacbell.net> wrote in message
> news:%239fxrxCcFHA.1152@tk2msftngp13.phx.gbl...
>> I'm working on an ASP.NET with VB.NET web application (Web Forms) and I
>> can't find an Alignment property for the TextBox nor the Label control?
>> What am I missing?
>>
>> Thanks, Rob.
>>
>
>
> In ASP.Net, you would use styles or stylesheets to control text alignment
> (see text-align attribute).
>
> Programatically:
> TextBox1.Attributes.Add("text-align", "right")
>
> Style:
>
> .MyCSSClass {
>    text-align : right;
> }
>
> Mythran
>
Author
14 Jun 2005 5:32 PM
Mythran
"Rob R. Ainscough" <roba***@pacbell.net> wrote in message
news:eOKjCAQcFHA.4040@TK2MSFTNGP10.phx.gbl...
> Hmmm...this doesn't appear to work?  What am I missing?
>
> Rob.
>

What code are you using?

Mythran
Author
14 Jun 2005 5:34 PM
Mythran
"Rob R. Ainscough" <roba***@pacbell.net> wrote in message
news:eOKjCAQcFHA.4040@TK2MSFTNGP10.phx.gbl...
> Hmmm...this doesn't appear to work?  What am I missing?
>
> Rob.
>

The following worked for me:
<html><head><title>Test</title></head>
<body>
<input type="text" style="width:100px;text-align:right;">
</body>
</html>

Mythran