如何从右侧输入文本框中的数据

问题描述:

在文本框中我想从右侧输入数据



像计算器中的文本框

in textbox i want to enter data from right side

like textbox in calculator

<style>
        .aligntext
        {
            text-align:right;
            }
    </style>












textBox1.TextAlign = HorizontalAlignment.Right


没有保证,但你可以使用CSS:



创建一个类:



No guarantees, but you might be able to use CSS:

Creat a class:

.rightText
{
    text-align:right;
}





然后在ASPX文件中将CSSClass属性设置为该类。





and then set the CSSClass attribute to that class in the ASPX file.

<asp:TextBox CSSClass="rightText">