I have a pretty simple application that extracts exchange rates from an RSS feed and displays content on the Grid.
I keep getting the error "The URI prefix is not recognised"
Using "feed//" always generates this error. I tried using "http://
". This works but that does not have the content that I need.
public partial class CurrencyRSS : System.Web.UI.Page
/*The rate shown for the US dollar is a representative mid-point determined
* by the Reserve Bank on the basis of quotations in the interbank foreign
* exchange market at 4.00 pm Australian Eastern Standard Time on the day concerned.
* Rates shown for most other currencies are calculated by crossing the rate for
* the US dollar with mid-points of buying and selling rates quoted at the same time.
* These rates are indications of market value only and may differ from those quoted
* by foreign exchange dealers.*/
protected void Page_Load(object sender, EventArgs e)
protected void Button1_Click(object sender, EventArgs e)
XmlTextReader rssReader = new XmlTextReader("feed://www.rba.gov.au/rss/rss-cb-exchange-rates.xml");
DataSet ds = new DataSet();
myCurrency.DataSource = ds;
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CurrencyRSS.aspx.cs" Inherits="eXtra.Pages.CurrencyRSS" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form1" runat="server">
<asp:GridView ID="myCurrency" runat="server">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />