Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Web Label Control - Align:Center

Reply
Thread Tools

Web Label Control - Align:Center

 
 
Alan Z. Scharf
Guest
Posts: n/a
 
      08-04-2003
1. Is there a way to center align the web label control in asp.net or
programatically in C#.?

2. If I attach the label to a CSS with alignment:center it works, but I
don't see a property or attribute to set directly.

Thanks.

Alan
___________________________
Alan Z. Scharf
GrapeVine Systems
New York City


 
Reply With Quote
 
 
 
 
Patrick Beaudoin
Guest
Posts: n/a
 
      08-04-2003
myControl.HorizontalAlign = HorizontalAlign.Center


>-----Original Message-----
>1. Is there a way to center align the web label control

in asp.net or
>programatically in C#.?
>
>2. If I attach the label to a CSS with alignment:center

it works, but I
>don't see a property or attribute to set directly.
>
>Thanks.
>
>Alan
>___________________________
>Alan Z. Scharf
>GrapeVine Systems
>New York City
>
>
>.
>

 
Reply With Quote
 
 
 
 
Alan Z. Scharf
Guest
Posts: n/a
 
      08-05-2003
Actually, to center a web form label, one needs to add to the style
attribute:

style="TEXT-ALIGN:center";

Alan


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optimizing the switch statement in Duff's Device (casting a label, label abuse) anon.asdf@gmail.com C Programming 10 10-11-2007 03:59 PM
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner ASP .Net 0 04-09-2007 09:00 PM
How to get/read Hard disk label / drive label Praveen Python 1 11-05-2006 07:48 PM
<label><div></div></label> allowed? Josef K. ASP .Net 3 05-22-2005 02:13 PM
label versus asp:label Question. Thanks. Shapper ASP .Net 2 05-07-2005 05:55 AM



Advertisments