2012-01-30 39 views
0

當我使用MailBee(Afterlogic組件用於傳統的ASP)加載頁面來將其用作郵件時,FormatNumber停止工作。導入到mailbee時,經典的ASP格式編號發生變化

這是ASP:

response.write FormatNumber(Round(summatot+moms,0),2)

,這是輸出我得到當我加載在瀏覽器中的文件:

6 069,00

這是正確的格式。但是,當我加載頁面的MailBee並使用該ASP將其發送:

Set oMailer = CreateObject("MailBee.SMTP") 
oMailer.LicenseKey = "REMOVED" 
oMailer.ServerName = "localhost" 


oMailer.Message.FromAddr = "REMOVED" 
oMailer.Message.ToAddr = "REMOVED" 
headern ="REMOVED" 
oMailer.Message.Subject = oMailer.Message.ToUTF8(headern) 

oMailer.Message.Charset = "utf-8" 


url = "http://localhost/xx.store.se/xx.asp?id="&ID 

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
xmlhttp.open "GET", url, false 
xmlhttp.send "" 
oMailer.Message.BodyText = oMailer.Message.ToUTF8(xmlhttp.responseText) 


oMailer.Message.BodyFormat = 1 


oMailer.Send 

我得到這個輸出的郵件:

60.6 900,00

我有點困惑,並非常有幫助!

最佳方面 萊納斯

回答

0

它有一些關於你的LCID。如果你正在使用它,請在include中查找它。

嘗試用你的格式腳本之前設置它:

session.LCID = LCID_VALUE_FOR_YOUR_LOCATION 

或頁面聲明。

+0

你是一個天才..我認爲它應該是足夠有session.LCID設置在「global.ASA」,所以它啓動每次頁面加載,但它沒有工作......謝謝! – Rufuhs 2012-01-30 12:08:24

+0

謝謝。但請注意,如果其他LCID不是由需要它的代碼的其他部分設置的。您可以將它設置爲頁面作用域:'%% LANGUAGE =「VBSCRIPT」CODEPAGE =「1252」LCID =「1046」%>'作爲頁面的第一行,因爲Session.LCID是會話範圍。 – rcdmk 2012-01-30 15:44:15