Page_Load not firing 2nd time round?

C

Craig Miles

Hi,

I have Form1.aspx. Form1 uses client side javascript to launch Form2.aspx
when a button is clicked:
window.showModalDialog("Form2.aspx?xxxxx=xxxx") etc.

The first time the Form1 button is clicked the Form2 Page_Load (server side)
is fired.
I close Form2 returning to Form1. Click the button again. This time when
Form2 loads
there is no Page_Load() event.

Why doesn't it fire?

Thanks,
Craig Miles.
 
C

Craig Miles

Found the answer. Had to add the following code in Form2's Page_Load to stop
it caching:
Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

Regards,
Craig Miles.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top