T
tshad
I am trying to set a session variable an find that the session variable
doesn't get set until I refresh the page.
I am trying to display an image with text on it (Captcha) and need to save
the text that gets printed. Each time the page gets refreshed a new random
number is used. I save this to session variable, but the page doesn't seem
to have it until I refresh. Each refresh gets me the previous number.
Doesn't really help me.
I have a page that calls a User Control which loads the image (which is
really a .aspx page) that outputs the image in the response stream.
The flow is something like:
************************************************
NewPage
Calls User Control - which has <img src="jpegImage.aspx"> in it.
Loads jpegImage.aspx from the img statement.
Calls dll and passes random number to use.
Dll writes number into session variable.
Dll creates the image and passes it back
Sets up the response pipe:
Response.Clear()
Response.ContentType = "image/jpeg"
' Write the image to the response stream in JPEG format.
ci.Image.Save(Response.OutputStream, ImageFormat.Jpeg)
Image is displayed (no session variable in trace).
If hit refresh, previous number in trace.
*****************************************************
Why isn't the session variable there before hitting the refresh?
Thanks,
Tom
doesn't get set until I refresh the page.
I am trying to display an image with text on it (Captcha) and need to save
the text that gets printed. Each time the page gets refreshed a new random
number is used. I save this to session variable, but the page doesn't seem
to have it until I refresh. Each refresh gets me the previous number.
Doesn't really help me.
I have a page that calls a User Control which loads the image (which is
really a .aspx page) that outputs the image in the response stream.
The flow is something like:
************************************************
NewPage
Calls User Control - which has <img src="jpegImage.aspx"> in it.
Loads jpegImage.aspx from the img statement.
Calls dll and passes random number to use.
Dll writes number into session variable.
Dll creates the image and passes it back
Sets up the response pipe:
Response.Clear()
Response.ContentType = "image/jpeg"
' Write the image to the response stream in JPEG format.
ci.Image.Save(Response.OutputStream, ImageFormat.Jpeg)
Image is displayed (no session variable in trace).
If hit refresh, previous number in trace.
*****************************************************
Why isn't the session variable there before hitting the refresh?
Thanks,
Tom