asp numeric values

R

Rahul Chatterjee

hello all

I am displaying values retrieved from a database using asp in text boxes. Is
there any way to right justify the values in the text box and also have them
in 2 places of decimals

Please advise

Thanks
 
R

Ray at

Rahul Chatterjee said:
hello all

I am displaying values retrieved from a database using asp in text boxes. Is
there any way to right justify the values in the text box

ASP can't make that happen, but you can use styles to align your text.

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_text.asp


and also have them
in 2 places of decimals

Download the WSH documentation here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9

Then look up the formatNumber function, assuming you're using VB Script.

Ray at work
 
R

rwg

IIn ASP, you can use FormatNumber, something like this:

<%
= FormatNumber( 12345.67, 2 )
%>

In your html, you can use: align='right'

-rwg
This is what I think, not necessarily what is accurate!

--------------------
| From: "Rahul Chatterjee" <[email protected]>
| Subject: asp numeric values
| Date: Fri, 16 Apr 2004 15:04:18 -0400
| Lines: 11
|
| hello all
|
| I am displaying values retrieved from a database using asp in text boxes. Is
| there any way to right justify the values in the text box and also have them
| in 2 places of decimals
|
| Please advise
|
| Thanks
|
|
|
 
D

DjSteadyEddie

Im fairly new to this whole ASP game. But i think you could easily right
align text boxes using CSS.

<style type="text/css">
textbox {
text-align:right;
}
</style>

Check out DevGuru.com for Good refrence pages on CSS / HTML. that will
tell you all the exact code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top