Textbox to align right
-
I have a textbox that I need to populate data with align=right I have it's label and this textbox w/in
tags. The label aligns right, but the text in the textbox stays on the left.
// Hopefully your code behing is CS // If so do this TextBox1.Style["TEXT-ALIGN"] = TextAlign.Right.ToString(); // It works for me ---------- Venus Patel http://patelsinc.blogspot.com/ A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
-
I have a textbox that I need to populate data with align=right I have it's label and this textbox w/in
tags. The label aligns right, but the text in the textbox stays on the left.
The above method will not work cross-browser (at least not in my experience). Use CSS instead by attaching a class to the textbox and in your css, set text-align: right; to your class. Do it like this: In the CSS: .yourclass { text-align: right; } Hope that helps.