I have two ASP .NET web forms A and B. A is a web form that geneates a binary graph and create some session variables before generate the graph. B is the display page which calls the A and display the graph generated by A. The code in B is like this:
<img width="" height="" src="graph.aspx?a=3&b=4">
<% Response.write(Session("numOfBars")) %>
graph.aspx is the file name of A, and "numOfBars" is a session variable created in A just before the graph is generated. My problem is the graph is displayed corretly in B, but B cannot get any session variable created by A. It seemed session variables are not passed to B at all. However, if I use
Response.redirect(B) in A, then I can print all session variables created by A. How can I pass session variables created in A to B without any redirection. Put it in another way, if B just calls A, why B can't see the session variable created by A? How can I pass them from A to B in this situation?
I tried all best but still couldn't solve the problem. Any suggestion or reference link is greatly appreciated.
-John