Question on popup window
<p>In my code I am using a popup window to display extra information. I also have the ability to export the information in the main window to Excel.</p>

<p>The problem is, after the window pops up -> I see the info -> I close the popup window -> but if I try the export to Excel button, it throws the exception <em>"null object referrence"</em> (if I use a try/catch, the exception doesn't occur - but I don't get any information). </p>

<p>In the export function I am doing something like this:</p>

<pre><code>{
   //some code .... here 
   con.close();
   session["dss"] = mydataset;
}
</code></pre>

<p>In the export button click event:</p>

<pre><code>   system.data.dataset dss = (system.data.dataset)session["dss"];
   //then some work on this
</code></pre>

<p>I think, probably when the popup window opens it ends the execution and that's why when I come back to the main window and try the export button the values for the tables and all goes out of scope.</p>

<p>Also, if I refresh the main page after closing the popup window I don't have any issue and can export the data.</p>

<p>Can you please help me with this?</p>

<p>Thanks,
Rahul</p>
