Results 1 to 4 of 4

Thread: How to display Euro symbol on ASP pages

  1. #1
    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.

  2. #2
    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:
    <%@ Language="VBScript" %>
    <%
    response.Codepage = 65001
    response.Charset = "utf-8"
    SetLocale("es-es")
    response.write(FormatCurrency(123456))
    %>

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    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.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    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.
    <%
    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))
    %>

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,640,861.72038 seconds with 16 queries