G
Guest
I apologise in advance for such a basic question, but I'm hoping someone will
take the time to answer my question.
In my code I define a Dataset :
Partial Class Default_aspx
Dim dsExcel As New DataSet
I fill the Dataset as follows :
Sub btnExcelList_Click(ByVal sender As Object, ByVal e As System.EventArgs)
<snip>
myData.Fill(dsExcel)
And I try to interrogate it in another sub :-
Sub btnImportLabinfo_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
<snip>
lblOutput.Text = CType(dsExcel.Tables(0).Rows.Count, String)
However, the scope of dsExcel is lost and I cannot retrieve the data. It
works in ASP.NET 1.1 where the whole class is defined in the code behind page.
I would really appreciate it if someone answered me.
Many thanks in advance,
SteveB.
take the time to answer my question.
In my code I define a Dataset :
Partial Class Default_aspx
Dim dsExcel As New DataSet
I fill the Dataset as follows :
Sub btnExcelList_Click(ByVal sender As Object, ByVal e As System.EventArgs)
<snip>
myData.Fill(dsExcel)
And I try to interrogate it in another sub :-
Sub btnImportLabinfo_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
<snip>
lblOutput.Text = CType(dsExcel.Tables(0).Rows.Count, String)
However, the scope of dsExcel is lost and I cannot retrieve the data. It
works in ASP.NET 1.1 where the whole class is defined in the code behind page.
I would really appreciate it if someone answered me.
Many thanks in advance,
SteveB.