First, in your StyleSheet (either inline or external), create a class. For the sake of this tip, we’ll call it ‘txtAlign’, but the name doesn’t matter.
Then, add your alignment needs to the class:
text-align: right;
Lastly, inside the TextBox Server Control on your page, use the CSSClass property of the textbox to assign the CSS value to the textbox:
CSSClass=”txtAlign”