Ref a dataset inside a procedure in C#
Hi,
Page_Load: All this does is to collect a dataset named folders. And call a
procedure called DisplayFolder and takes the roottreenode as an in
parameter.
private void Page_Load(object sender, System.EventArgs e)
{
Microsoft.Web.UI.WebControls.TreeNode treenode1 = new TreeNode();
treenode1= oTree.GetNodeFromIndex("0");
//Henter ut data fra document klassen
Business.Document objDocument = new Business.Document(GetConnStr());
DataSet Folders = objDocument.GetAllFolder();
DisplayFolder(treenode1);
}
//Recursive call of the procedure
In the Display folder function I want to traverse the dataset and do some
logic, when I find a treenode I want a recursive call to the procedure with
the current treenode as a the paramer.
But how can I access the dataset inside this procedure?
I cant pass the data set as an in parameter I guess? The I guess a new
dataset will be build each time?
if a make the procedure as this:
void DisplayFolder(TreeNode treenode1,DataSet Folders)
{
}
I would have to pass the dataset for each time the procedure shoul call it
self.
Cheers,
jana