I'm trying to access a session variable. It loses its value the first time I hit a page, but if I hit that page twice before doing anything(click the same link twice), it works.
So, page default.aspx, has the below code:
If I start at default.aspx and click on the image that calls the above code, when it redirects ProdID is NOTHING. However, if when I start at default.aspx, and I reload it by clicking a link that directs right back to itself, ProdID is the right value when redirected. It seems somehow I have to hit the page twice to load up the session...DOes that make any sense?
So, page default.aspx, has the below code:
Code:
Session("ProdID") = ProdID
Response.Redirect("/pages/Products.aspx")
If I start at default.aspx and click on the image that calls the above code, when it redirects ProdID is NOTHING. However, if when I start at default.aspx, and I reload it by clicking a link that directs right back to itself, ProdID is the right value when redirected. It seems somehow I have to hit the page twice to load up the session...DOes that make any sense?