Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-10-2009
Member
 
Join Date: Sep 2009
Posts: 30
How to display Euro symbol on ASP pages

Currently i'm working on my college assignment. It basic involves ASP and other programming languages. Now the problem is that i don't have much knowledge about java script and other programming languages. I would like to know that how can i display the Euro symbol (?)on my ASP pages? Does any body knows about it? Kindly help me out to resolve the above issue. Any kind of help would be appreciated. Thanks.
Reply With Quote
  #2  
Old 07-10-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: How to display Euro symbol on ASP pages

I have used both the &-e-u-r-o-; and &-#-8-3-6-4; special characters(hyphenated to avoid them displaying as actual euro symbols). If you save the ASP file in UTF-8 format, then try this instead:
Quote:
<%@ Language="VBScript" %>
<%
response.Codepage = 65001
response.Charset = "utf-8"
SetLocale("es-es")
response.write(FormatCurrency(123456))
%>
Reply With Quote
  #3  
Old 07-10-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: How to display Euro symbol on ASP pages

The decimal comma is only used for display purposes, internally it makes no difference what decimal separator is used. First, the "SetLocale()" function instructs the ASP engine to use a Euro-friendly locale. This is similar to setting the LCID but I much prefer the "SetLocale()" function. That is, unless you convert decimal amounts to string, and then try to interpret them again, or of course you are receiving input from the user who writes a decimal comma.
Reply With Quote
  #4  
Old 07-10-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: How to display Euro symbol on ASP pages

It works because Microsoft has done the heavy-lifting and the "FormatCurrency()" function and the "Response" object know that the "Espanol (Espa?a)" locale requires Euro. In that case, I believe you need to use Decimal.Parse(strValue). I tend to use emphasis on the character as it is a rather weak-looking HTML entity.
Quote:
<%
Function FormatEuro(n)
If IsNumeric(n) Then
FormatEuro = "<b>€</b>" & FormatNumber(n,2)
Else
FormatEuro = "<b>€</b>" & n
End If
End Function

Response.Write(FormatEuro(48.24))
%>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to display Euro symbol on ASP pages"
Thread Thread Starter Forum Replies Last Post
What is the Keyboard shortcut for euro symbol Abigaill Customize Desktop 7 28-05-2010 11:13 PM
Support for the new Euro currency symbol in Office Emma.J Windows Software 5 18-03-2010 06:28 AM
Web pages display incorrectly Kasper Windows Software 3 12-11-2009 09:28 PM
Web pages content display issues jasonthat Networking & Security 4 23-05-2009 10:57 AM
Games Pages does not display goatape Technology & Internet 2 30-09-2008 12:01 PM


All times are GMT +5.5. The time now is 02:58 AM.