Problem with Euro convert in ASP

# Thread: Problem with Euro convert in ASP

1. Member
Join Date
Dec 1969
Posts
49

## Problem with Euro convert in ASP

Need to know how to code this im sure its simple, new to ASP !<BR><BR>Basically what i need to do is, i pull the Irish price of a product from out products database and display it on the page ie<BR><BR>&#060;b&#062;IR£&#060;% Response.Write RS( "product_price") %&#062;&#060;/b&#062;<BR><BR>Which displays for example " IR£ 3421 "<BR><BR>How can i display " IR£ 3421 / € 4213 " ie the equivalant in euro is it:<BR><BR>&#060;b&#062;IR£&#060;% Response.Write RS( "product_price") %&#062; / € (("product_price")*(0.74))&#060;/b&#062;<BR><BR>Please help, really in a pickle !! :) cheers<BR>

2. Rhino Guest

## You were very close

You need to put &#060;% %&#062; tags around the field in the euro section, you also need to put RS in front of ("product_price").<BR><BR>You might want to calculate the value in your Sql string and then just display it.<BR><BR>&#060;b&#062;IR£&#060;% =RS("product_price") %&#062; / € &#060;% =(RS("product_price")*(0.74))%&#062;&#060;/b&#062;<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
241

## RE: Problem with Euro convert in ASP

dim intProductPrice<BR>intProductPrice = rs("product_price") &#039;you are accessing product price more than once so it is quicker to access a local variable rather than pull it repeatedly out of a collection<BR><BR>with response &#039;nice and fast, requires vbs5.5 (comes with ie5.5)<BR> .write "&#060;b&#062;IR£"<BR> .write intProductPrice<BR> .write " / €"<BR> .write intProductPrice * 0.74<BR> .write "&#060;/b&#062;<BR>end with<BR><BR><BR>

4. Member
Join Date
Dec 1969
Posts
49

## RE: Problem with Euro convert in ASP

Thanks guys, super stuff, works perfect !!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•