Variables defined in the partial class - ASP.NET 2.0
- From: "fisab" <fisab@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Apr 2005 09:24:02 -0700
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.
.
- Follow-Ups:
- Re: Variables defined in the partial class - ASP.NET 2.0
- From: Brock Allen
- Re: Variables defined in the partial class - ASP.NET 2.0
- Prev by Date: Re: HttpWebRequest with java session id cookie; HELP PLEASE
- Next by Date: Editing a Deployed ASP.NET
- Previous by thread: Method Question?
- Next by thread: Re: Variables defined in the partial class - ASP.NET 2.0
- Index(es):
Relevant Pages
|