Right Justify Textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I right justify input data in a textbox? I have some textboxes that
are used to input numbers, and I would like to right justify them.
 
Hi Brian,
I am using a textbox on a web application, and I also want to right
justify on some cells in a datagrid, while editing. The textbox doesn't
allow for TextAlign. I checked the help, and it looks like this may be for a
windows form. I thought there might be something under styles or controls,
but haven't been able to find anything.
 
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is TextBox Then
DirectCast(ctl, TextBox).Style("TEXT-ALIGN") = "right"
End If
End Sub

u can changed left, center.
regards,
 
Back
Top