ASP questions

Luis G

<i><b>Problemator</b></i>
Staff member
I have no idea about the visual basic other than my notions of the old basic when you had to enumerated line codes and use goto sentences.

Therefore i need some help from you guys :)

first question, is there a way to limit the shown decimals by a variable? (or round it to 2)

This is sorta de piece of ASP code:
<b><% =totalimp %></b>

It is an accumulator and for some wicked reason it displays this result: 3684163.71000001 , which is kind of weird because all the numbers added have only 2 decimals :confuse3:
 
I have Visual Basic installed on my system, unfortunately, ASP doesn't recognize all the functions of VB, i tried using the Format() function but it won't show the page:

* Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'Format'
 
weeeeeeeeeeee, this flashback was almost a miracle, i remembered that Office installs a portion of Visual Studio to develop webpages, so i looked into it, and now i got the complete vbs language reference in the help files.

If there's one good thing about microsoft, that's the function reference manuals they make. :headbang:

btw, the function i needed is called FormatNumber()
 
Back
Top