Dove sta l'errore in questa semplice funzione?
<%@ Import Namespace="System.Data" %>
<SCRIPT language="c#" runat="server">
void Submit_Click(Object sender, EventArgs e)
{
string url = "MiaStringaPercorsoXML";
ds = new DataSet();
//recupero di dati XML dall'URL
ds.ReadXml(url);
DL.DataSource = ds.Tables(0).DefaultView;
DL.DataBind();
}
</SCRIPT>
<ASPataList id="DL" runat="server">
<itemtemplate>
<hr width="50%" align=center>
<center>
<h3><%# DataBinder.Eval(Container.DataItem, "headline_text") %></h3> Registrata: <%# DataBinder.Eval(Container.DataItem, "source") %>
Link: "> <%# DataBinder.Eval(Container.DataItem, "url") %></center> </itemtemplate>
</ASP:datalist>
Ottengo questo errore
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'ds' does not exist in the class or namespace 'ASP.News_aspx'
Source Error:
Line 11: string url = "Mia Stringa URL per Dati XML...";
Line 12:
Line 13: ds = new DataSet(); (****)
Line 14:
Line 15: