R
Ross
I am trying to pass a datatable from a page to another
page in a different frame. The user would see the results
of a query in the first frame then could navigate through
the second frame to a page that uses the query data for
another purpose.
I kept getting null-object-reference errors when I tried
to bind the data to a control in the second frame. In an
attempt to trace the problem I set up a little test of
session variables to see if I had the basics right.
Perhaps I shouldn't assume it works just like ASP. In the
page in frame1, I have (in Page_Load) this line:
Session("test1") = "testing testing"
In the page in frame2 I have (in Page_Load):
Try
FileOpen(1, "C:/Inetpub/wwwroot/mysite/debugout.txt",
OpenMode.Output, OpenAccess.Write, OpenShare.Default)
WriteLine(1, "sessiontest:", Session("test1"))
Catch err As Exception
WriteLine(1, err.ToString())
Finally
FileClose(1)
End Try
The result is a blank page in frame2, and debugout.txt has
one line:
"sessiontest:"#ERROR 448#
I can't find a reference to this error anywhere. Am I
using session variables correctly? Do I have to create a
global.asax file to initialise session variables? I have
no clue what is happening here.
page in a different frame. The user would see the results
of a query in the first frame then could navigate through
the second frame to a page that uses the query data for
another purpose.
I kept getting null-object-reference errors when I tried
to bind the data to a control in the second frame. In an
attempt to trace the problem I set up a little test of
session variables to see if I had the basics right.
Perhaps I shouldn't assume it works just like ASP. In the
page in frame1, I have (in Page_Load) this line:
Session("test1") = "testing testing"
In the page in frame2 I have (in Page_Load):
Try
FileOpen(1, "C:/Inetpub/wwwroot/mysite/debugout.txt",
OpenMode.Output, OpenAccess.Write, OpenShare.Default)
WriteLine(1, "sessiontest:", Session("test1"))
Catch err As Exception
WriteLine(1, err.ToString())
Finally
FileClose(1)
End Try
The result is a blank page in frame2, and debugout.txt has
one line:
"sessiontest:"#ERROR 448#
I can't find a reference to this error anywhere. Am I
using session variables correctly? Do I have to create a
global.asax file to initialise session variables? I have
no clue what is happening here.