Opening aspx page as dialog shows blank page
<p>Following is the problem, I have a ascx page having a grid control with data on click of a row in the grid I open a aspx page as dialog with the details of the selected row. </p>

<p>Problem is sometimes the aspx page is opened without any data i.e. the page is opened but the server side code of the page is not executed which loads the data. Next if I close the page and select a new row the aspx page is opened with the data from previous selection. Any help why this would occur.</p>

<p>Edited</p>

<p>Below is what i am doing</p>

<p>on click of the hyperlink in the datarow of the grid i call a javascript function.</p>

<pre><code>function showDialogWindow(aParams, _object)
{
    var arrFieldVals = new Array();
    arrFieldVals = aParams.split(',');
    var returnValue = "";
    var sFeatures = "";

    PageMethods.SetSessionValue("skey", arrFieldVals[1]);
    switch(arrFieldVals[0])
    {
        case "mypage.aspx":
            sFeatures = "dialogWidth=756px;dialogHeight=450px;border=thick;center=yes;help=no;status=no;";
        break;
        default:
        break;
    }

    if (sFeatures!=undefined)
    {
       if (typeof(hdnCurrentPage) != "undefined"  &amp;&amp;  hdnCurrentPage != "")
           returnValue = window.showModalDialog('CRM/PopUp.htm?' + arrFieldVals[0],window,sFeatures);
       else
           returnValue = window.showModalDialog('PopUp.htm?' + arrFieldVals[0],window,sFeatures);
       PageMethods.RemoveSessionObjects();
    }    
}
</code></pre>

<p>In the page i have used the value from the session in the lode event.</p>

<p>Thanks</p>
