Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do force text boxes to right-justify???

0 views
Skip to first unread message

Robert Clark

unread,
May 7, 2000, 3:00:00 AM5/7/00
to
I am creating a data entry screen with text boxes within a table. I am
collecting the data into arrays (there are a fixed number of rows the user
is allowed to work with). Then I am using
<%=Server.HTMLEncode(array(element)))%> to push the data into text boxes.
The problem is that the data is always left-justfied no matter what I do to
the text box or to the cell. Does anyone have a suggestion? Is the
Server.HTMLEncode() a poor method of filling text boxes (or other form
controls)? Thanks in advance...!

Robert Clark
Dixon Creek Software

Vikas Ahuja

unread,
May 7, 2000, 3:00:00 AM5/7/00
to
Just a guess, is the data showing with trailing spaces? Many times the
database field is set to a fixed width, resulting in the value always being
returned with spaces padded at the end. If such is the case, it will always
*appear* to be left justified. I'd try
Server.HTMLEncode(Trim(array(element)) or
Trim(Server.HTMLEncode(array(element))

Vikas


"Robert Clark" <rob...@dixoncreek.com> wrote in message
news:Fg3R4.29664$55.2...@news1.sttls1.wa.home.com...

Mosley

unread,
May 11, 2000, 3:00:00 AM5/11/00
to

"Robert Clark" <rob...@dixoncreek.com> wrote in message
news:Fg3R4.29664$55.2...@news1.sttls1.wa.home.com...
> I am creating a data entry screen with text boxes within a table. I am
> collecting the data into arrays (there are a fixed number of rows the user
> is allowed to work with). Then I am using
> <%=Server.HTMLEncode(array(element)))%> to push the data into text boxes.
> The problem is that the data is always left-justfied no matter what I do
to
> the text box or to the cell. Does anyone have a suggestion? Is the
> Server.HTMLEncode() a poor method of filling text boxes (or other form
> controls)? Thanks in advance...!
>
> Robert Clark
> Dixon Creek Software
>
>

I think you mean right aligned


style="text-align: right"

0 new messages