473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

showmodaldialog and asp.net

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;dialogW idth: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
Nov 18 '05 #1
3 4308
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

"Venkat Chellam" <ve************@yahoo.com> wrote in message
news:ac**************************@posting.google.c om...
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;dialogW idth:250px;dialogHeight:20
0px'; 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

Nov 18 '05 #2
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

"Venkat Chellam" wrote:
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;dialogW idth: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

Nov 18 '05 #3
Faisal,

I have the same problem. Your answer solved my problem also. Thank you!

"Faisal" wrote:
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

"Venkat Chellam" wrote:
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;dialogW idth: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

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon Storr | last post by:
Is it possible to make the parent window refresh when a modal dialog is closed? I know I can use window.opener.location.reload(true); for a 'normal' window, but this doesn't work for...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
4
by: MW de Jager | last post by:
I want to call ShowModalDialog(...) from my C# code in the code behind page of my aspx page. I do not want to link this to a button, since I want to first do some checking myself before I call the...
3
by: needin4mation | last post by:
Hi, I have an asp:button that has a ShowModalDialog script attribute added to it. When the ShowModalDialog opens the user is supposed to select some data which is then sent back to the calling...
2
by: Sarah | last post by:
I am using the javascript showModalDialog function to open a file upload window. The function opens a page which contains a usercontrol housing the file upload stuff. The control works fine when...
3
by: johkar | last post by:
Just want a verification of logic. This seems to work for IE and Firefox, but I wonder if it would be a problematic test in any of the other latest browsers? Is the use of the "window" object...
1
by: John | last post by:
Hi, I'm having a problem opening / downloading csv files when called from a page opened with window.showModalDialog( ). To isolate this problem, I've written 3 files (see below). 1. main.htm...
6
by: David | last post by:
Hi all, I am opening a webform with showModalDialog. This appears to pop-up fine, though I have a problem... Inside the webform is a treeview control. When the treeview is populated, I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.