BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 

 
 Home
    Shop
    Advertise
    Write For Us
    Affiliate
    Newsletter
    Contact

How To Align Text in TextBox to Right or Center?

Let say you have one TextBox Control on ASP.NET web form, named txtAligned. To align text in TextBox to right use this code:

[ C# ]

txtAligned.Style["text-align"] = "right";

[ VB.NET ]

txtAligned.Style("text-align") = "right"

 

To align text to the middle use this code:

[ C# ]

txtAligned.Style["text-align"] = "center";

[ VB.NET ]

txtAligned.Style("text-align") = "center"



Related articles:

1. Site Maps In ASP.NET

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback



Copyright © 2002-2008 Bean Software. All rights reserved.

Related articles:

1. Site Maps In ASP.NET