
I dont believe...
ASP does not have that feature, It means I will have to create a function....

Write your own function......!

Really? You think ASP is that smart huh?

If your dog has no wings..
does that mean you make wings to make it fly?<BR>Let us know what asp doesn't have, may be it could be<BR>something that cannot even possible in ASP.You Got my point!<BR><BR>:)

LOL....
...well it is possible but you have to code for it.<BR><BR><BR>i just made wings for your dog :)<BR>

RE: I dont believe...
<% OPTION EXPLICIT %><BR><BR><%<BR><BR>Dim UnitNames, TeenNames, DecadeNames<BR>UnitNames = Array(" zero"," one"," two"," three"," four", _<BR> " five"," six"," seven"," eight"," nine" )<BR>TeenNames = Array(" ten"," eleven"," twelve"," thirteen"," fourteen", _<BR> " fifteen"," sixteen"," seventeen"," eighteen"," nineteen" )<BR>DecadeNames = Array(" zero"," ten"," twenty"," thirty"," forty", _<BR> " fifty"," sixty"," seventy"," eighty"," ninety" )<BR><BR>Function NumberAsWord( num )<BR> Dim millions, thousands, hundreds, decades, result<BR><BR> If Not isNumeric( num ) Then<BR> NumberAsWord = "<i>That is NOT a valid number!</i>"<BR> Exit Function<BR> End If<BR><BR> result = ""<BR> num = CDbl(num)<BR><BR> If num = 0 Then<BR> NumberAsWord = "zero"<BR> Exit Function<BR> End If<BR><BR> If num < 0 Then<BR> num =  num<BR> result = "<i>NEGATIVE</i> "<BR> End If<BR><BR> millions = 999999<BR><BR> On Error Resume Next<BR> millions = num 1000000<BR> num = CLng( num MOD 1000000 )<BR> On Error GoTo 0<BR><BR> If millions > 0 Then<BR> If millions > 999 Then<BR> NumberAsWord = result & "BILLIONS and BILLIONS"<BR> Exit Function<BR> End If<BR> result = result & NumberAsWord( millions ) & " million"<BR> If num = 0 Then<BR> NumberAsWord = result<BR> Exit Function<BR> End If<BR> End If<BR> <BR> thousands = num 1000<BR> num = num MOD 1000<BR> If thousands > 0 Then<BR> result = result & NumberAsWord( thousands ) & " thousand"<BR> If num = 0 Then<BR> NumberAsWord = result<BR> Exit Function<BR> End If<BR> End If<BR> <BR> hundreds = num 100<BR> num = num MOD 100 <BR> If hundreds > 0 Then<BR> result = result & UnitNames( hundreds ) & " hundred"<BR> End If<BR> <BR> decades = num 10<BR> num = num MOD 10<BR> If decades = 1 Then<BR> result = result & TeenNames( num ) <BR> Else<BR> If decades > 1 Then<BR> result = result & DecadeNames( decades )<BR> End If<BR> If num > 0 Then<BR> result = result & UnitNames( num )<BR> End If<BR> End If<BR><BR> NumberAsWord = result<BR>End Function<BR><BR>%><BR><BR><HTML><BR ><BR><HEAD><BR><TITLE><BR>Conv erting an Integer to Words<BR></TITLE><BR></HEAD><BR><BR><BODY onLoad="document.DemoForm.TestNumber.focus();" 2;<BR><BR><CENTER><BR><H3>This demo shows how to convert an integer into<BR> English words.<BR></H3><BR><P><BR><BR><%<BR>Dim test<BR>test = Request.Form("TestNumber")<BR>If ("X" & test) <> "X" Then<BR>%><BR> <BR> <p><BR> <UL><BR> <LI>The number <% = test %> becomes <BR> <B><% = NumberAsWord(test) %></B>.<BR> </UL><BR> <p><BR> <HR><BR><% End If %><BR><BR><p><BR><FORM Action="NumToWords.asp" Name="DemoForm" Method="Post"><BR>Enter any integer: <BR><INPUT Name="TestNumber" Value="0" Size=25<BR> onChange="document.DemoForm.submit();" ><BR></FORM><BR><BR><p><BR><hr>< BR><p><BR><FORM Action="ShowSource.asp" Method="Post"><BR><INPUT Type=Hidden Name=Source Value="NumToWords.asp"><BR><INPUT Type=Submit Name=Show<BR> Value="Show me the ASP source code for this page"><BR></FORM><BR><p><BR><p><BR>&# 060;font size=1><i><BR>Copyright © 2000 W.F.Wilkinson<BR><BR>This is shareware: <BR>free so long as the copyright notice is retained.<BR><BR></i></font><BR><BR></CENTER><BR><BR></BODY><BR></HTML><BR>

{sigh} Yeah that helps.....
....us stop reposts and crossposts...give them the answer.<BR><BR>oh well hope he atleast thanks you inspite of him having no Netiquette.<BR>

RE: {sigh} Yeah that helps.....
Just can't handle all of that back and forth nonproductive crap some days. I know that giving him the answer doesn't really help him learn but he doesn't want to learn he wants to cut and paste so.....

Thanx i will Try

...SO.....let him rot trying.
oh well the idiot got what he wanted.
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

