showmodaldialog and asp.net

V

Venkat Chellam

I am facing a very peculiar problem


I have a asp.net page with a grid loaded with some rows in the
database.
On each row, i have a editcommand column for editing the row.

When user click the edit button, i do some calcualtion and depending
on the results of calcalation, i need to show a modal dialog bos with
different page.


So what i am doing if i have to show the confimration dialog, i am
invoking a javascript which is as follows

function OnConfirm()
{

var winSettings = 'center:yes;resizable:no;help:no;status:no;dialogWidth:250px;dialogHeight:200px';
winArgs=null;
winArgs= window.showModalDialog("confirmation.aspx",window);

}


Now in the OnPageLoad event of confirmation.aspx, i am getting some
session values which i set before calling the javascript to show the
modal dialog and and using this session values to show in the
confirmation page. When i close the confirmation dialog, i am calling
another javescript which calls window.close. But i think it just
closed the client window but page is not unloaded from the memory.

If i select the next row and try to do the same thing, page load of
confirmation.aspx is not called, i still get the previous values and
don't get updated values because page_load of confirmation.aspx where
i am getting updated session variables is not getting invoked.


Its very urgent, i have a release on coming tuesday. Any help would be
appreciated


venky
 
W

William F. Robertson, Jr.

We have experience this problem several times relating to modal dialogs.
You modal page is getting cached. The workaround we did is to appear a
querystring value to the Confirmation.aspx page. It isn't used for
anything, but it lets your browser know the request is for a new page and it
can't use the cached version.

Plus in a modal box, no one sees the url, so it doesn't unpretty your pages
any.

HTH,
bill
 
G

Guest

Yes, this appears to be a caching problem.

This code snippet worked for me. Just tell the browser to NOT cache the
page, but force a server retrieval everytime.

Place this between the <HEAD> tags in your aspx file.
<meta http-equiv="Pragma" content="no-cache">

Faisal
 

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

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top