473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Right Align Textbox/label

I need to right align the text in a textbox (or label) in my ASP.NET app...
Any clues best way to accomplish this?
MTIA
wardeaux
Nov 18 '05 #1
3 8863
Hi Wardeaux,

Use the align or HorizontalAlign property of the tag that contains the
textbox:

<p align='Right'>
<td align='Right'>
<asp:TableCell HorizontalAlign='Right'>

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Wardeaux" <wa******@bellsouth.net> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
I need to right align the text in a textbox (or label) in my ASP.NET app... Any clues best way to accomplish this?
MTIA
wardeaux

Nov 18 '05 #2
Wardeaux,

The best way to handle it is probably through the use of CSS. Try
using the text-align element to define the alignment.
Thanks,
Ian Suttle
http://www.IanSuttle.com

Nov 18 '05 #3
txtPay.Attributes.CssStyle.Add("TEXT-ALIGN","right");

vinay
"Wardeaux" wrote:
I need to right align the text in a textbox (or label) in my ASP.NET app...
Any clues best way to accomplish this?
MTIA
wardeaux

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom | last post by:
Hi, I have this question below but still cannot fix it. http://communities.microsoft.com/newsgroups/previewFrame.as p? ICP=msdn&sLCID=us&sgroupURL=microsoft.public.dotnet.framewo...
3
by: kai | last post by:
Hi, All When I place a label on a Web form, label text is always left align, I cannot find the property to set right align. Any way to set align property for the label text to right align? ...
6
by: tshad | last post by:
I have a cell with 2 items in it: a textbox and a link. The link is actually a button (image), but for the example I am using a link, which is doing the same thing. Here is the stripped down...
2
by: tshad | last post by:
I can't seem to get my cells in my Datagrid to right justify for my money fields. I have set up my template tag as: <asp:TemplateColumn Visible="true" HeaderText="Unit Price:"...
0
by: Jean-François Michaud | last post by:
Hello people, I'm having a hard time figuring out how to align my page numbe properly to the right margin in the Table of content I'm generating. I'm using FOP and there are some known issues...
4
by: Jason | last post by:
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg"...
5
by: tshad | last post by:
I have a datagrid that I cannot get to right justify a money amount (which is just a label). No matter what I do - it still right justifies it. <asp:TemplateColumn Visible="true"...
4
by: Bjorn Sagbakken | last post by:
With .NET 2.0: Is there a way to right align the text in a textbox? The task is to edit numbers in a table-column, and it looks kind of silly with the numbers left-aligned. A label respond to...
3
by: happyse27 | last post by:
Hi All, I wanted to align the text box for user registration but the code just wont budge... Kindly advise what is wrong? Cheers... Andrew <HTML>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.