Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Pass session variable form ASPX page to ASHX Handler in Chrome

I have a ASPX page that I am doing a image upload on

In the vb code I am setting a session variable for the file path
        PathTemp = Server.MapPath("EmailImages/") + Session("BusinessID")
        Session.Add("templateImagePath", PathTemp)
(AND)
Session("templateImagePath") = PathTemp

The file is passed to an ASHX handler page
I am trying to get the session variable on that page

I have tried several ways including this...
Dim filePath as String = ""
filePath = HttpContext.Current.Session("templateImagePath").ToString()
and this
filePath = context.Session("templateImagePath").ToString()

ALl of which gives me an object doesn't exist on that line of code.
Avatar of SimonPrice3376
SimonPrice3376

Can you share more of the code please? Specifically the ASHX code and the code that is passing in the session variable.
ASKER CERTIFIED SOLUTION
Avatar of Larry Brister
Larry Brister
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

Found my own solution