I have been trying unsuccessfully to retrieve a Session varaible from within an ASHX file that i'm using to build an XML file.
What I am trying to achieve is quite simple really.
My ASHX file is used to dynamically build an XML file so that I can then bind it to a TreeView control later on. However the dynamic part isn't quite working because the ID that I need from the session seems to not be passed into the ASHX file.
I have tried using the following methods to do this:
1) Include interfaces IRequiresSessionState and IReadOnlySessionState
2) Tried accessing the value like this: Session["ID"] or context.Session["ID"] or HttpContext.Current.Session["ID"]
I am setting the Session variable in the MasterPage's code behind.
Can anyone help?
View Complete Post