Try using CSS or inline styles to set the alignment. The style in question
is text-align.
If the label fails, as it renders to SPAN (should not, but if), switch to a
Panel control, add a LiteralControl to its Controls property, for the text,
and apply the text-align. Panel renders to DIV, which I am certain can
center align. Try option 1 first.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*********************************************
Think outside the box!
*********************************************
<sw*************@yahoo.co.inwrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
Hi all,
I am new to asp.net. So, may be my question may be simple. But I am
feeling hard to achieve this.
I need to create a web custom label control, for which I have to
assign new property called "Align". It should have center,left and
right alignments.
I have created a label with this property and set that to textalign.
But it doesnt have center alignment. How can I get center alignment?
And pls tell me as to how to associate that property to the control.
Thanks in advance..