Posted by: R Manimaran | February 27, 2007

ALIGN TEXT IN ASP.NET LABEL AND TEXTBOX

Using CSS at design time 

    <style>.aligntext   {Text-align:center;    }</style> 

Using Properties window set the CSSClass as aligntext 

At Runtime

 On Page_load write this code

 TextBox1.Style[“text-align”]=”center”;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: