What happened to Alignment property?

R

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.
 
M

Mythran

Rob R. Ainscough said:
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
 
R

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.
 
M

Mythran

Rob R. Ainscough said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top