p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 10th, 2009, 08:43 AM
Authorized User
Points: 211, Level: 4
Points: 211, Level: 4 Points: 211, Level: 4 Points: 211, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.NET AJAX

I have a website for which I change the currency conversion rate for the dollar vs the euro every day. After reading the chapter on AJAX, I got the impression that I should be able to program this into my website to do automatically through web services. Is my thinking correct?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old February 10th, 2009, 03:20 PM
Imar's Avatar
Wrox Author
Points: 33,563, Level: 80
Points: 33,563, Level: 80 Points: 33,563, Level: 80 Points: 33,563, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,231
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Hi areed24,

You can certainly use web services for this. Not sure where AJAX fits in though. You typically convert only once a day (or maybe more often) and then store the exchange rate somewhere on the server so you can reuse it many times.

What's your use case for doing this client side? That is, why would you want to use AJAX to do this in the browser?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004

Did this post help you? Click the button to show your appreciation!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old February 20th, 2009, 01:29 PM
Authorized User
Points: 211, Level: 4
Points: 211, Level: 4 Points: 211, Level: 4 Points: 211, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I misunderstood what I read. Do you have a suggestion as to how I could update the currency conversion rate without doing it manually?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old February 21st, 2009, 06:25 AM
Imar's Avatar
Wrox Author
Points: 33,563, Level: 80
Points: 33,563, Level: 80 Points: 33,563, Level: 80 Points: 33,563, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,231
Thanks: 7
Thanked 203 Times in 201 Posts
Default

First you need to find a (free or paid) service that allows you to do the conversion. For this, search Google and you'll find a lot of results.

Depending on the service, you typically use a Web Service to get their data, although plain XML or simple http requests are common as well. Then at your server, where you need the currency you can do something like this (pseudo) code:

If currency not in the cache then
' Connect to your conversion service
' Get the conversion rate
' Store the conversion rate in the cache
End if

Return the conversion rate.

By storing it in the cache, you don't have to connect to the remote service every time you need the rate....

Hope this helps,.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004

Did this post help you? Click the button to show your appreciation!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net ajax tookit, included in Asp.net 3.5 PeterPeiGuo Visual Web Developer 2008 1 January 6th, 2009 04:25 AM
ASP.NET 2.0 Ajax raminriahi General .NET 2 September 5th, 2007 01:48 PM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 01:33 AM
ajax in asp.net imjayakumar Crystal Reports 0 April 3rd, 2007 08:26 AM
ASP.NET AJAX inkrajesh ASP.NET 2.0 Professional 3 January 19th, 2007 03:42 PM



All times are GMT -4. The time now is 06:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc