Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start number entry right side of the text box?

In ASP.NET Web Application

Usually in Text-box numbers starts from left side of the text-box

But i want the numbers to start from Right to left

I check in properties of text-box to any alignment but i didn't find it.

like image 1000
Anish varma Adduri Avatar asked Oct 30 '22 03:10

Anish varma Adduri


2 Answers

You need to do it with css styling, add "text-align:right" to the control.

Example:

<asp:TextBox id="textBoxNumber" runat="server" style="text-align:right"></asp:TextBox>
like image 183
Dr. Stitch Avatar answered Nov 15 '22 05:11

Dr. Stitch


You can also use CSS property "direction".

Example:

<asp:TextBox ID="TextBox1" runat="server" CssClass="rtol"></asp:TextBox>

CSS:

.rtol { direction:rtl; }
like image 26
Saravanan Sachi Avatar answered Nov 15 '22 06:11

Saravanan Sachi