473,289 Members | 1,756 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,289 software developers and data experts.

window.showModalDialog, databinding and IsPostBack


[VS 2005/ASP.NET 2.0 question]

Hi,

From my main page (default.aspx) I am calling another .aspx (e.g.
otherpage.aspx) page through Javascript using window.showModalDialog.

otherpage.aspx has a databoud control (webchart), bound to a SQLDataSource.
The first time otherpage.aspx is opened from default.aspx the databinding
occurs and the page_load occurs on otherpage.aspx. When the user closes that
modal form by clicking the close box ("X") at the top right corner of the
modal form, the modal form (otherpage.aspx) closes.

However, the next time otherpage.aspx is called from default.aspx (again
using window.showModalDialog) there is no databinding and page_load does not
occur anymore. It looks like otherpage.aspx is still in memory and therefore
does not do its page_load or databinding.

Is there a way to remove otherpage.aspx from memory once the user closes it
by clicking the form 'X' close button or is there a way to call the
databinding from default.aspx through javascript - or is there a simpler
way?....
-> Denis
May 11 '06 #1
1 3051
Zak,
Try to call ExpirePageCache function on form_load:

private void ExpirePageCache()
{
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.Cache.SetExpires(DateTime.Now-new TimeSpan(1,0,0));
Response.Cache.SetLastModified(DateTime.Now);
Response.Cache.SetAllowResponseInBrowserHistory(fa lse);
}

"Zak Lomakus" wrote:

[VS 2005/ASP.NET 2.0 question]

Hi,

From my main page (default.aspx) I am calling another .aspx (e.g.
otherpage.aspx) page through Javascript using window.showModalDialog.

otherpage.aspx has a databoud control (webchart), bound to a SQLDataSource.
The first time otherpage.aspx is opened from default.aspx the databinding
occurs and the page_load occurs on otherpage.aspx. When the user closes that
modal form by clicking the close box ("X") at the top right corner of the
modal form, the modal form (otherpage.aspx) closes.

However, the next time otherpage.aspx is called from default.aspx (again
using window.showModalDialog) there is no databinding and page_load does not
occur anymore. It looks like otherpage.aspx is still in memory and therefore
does not do its page_load or databinding.

Is there a way to remove otherpage.aspx from memory once the user closes it
by clicking the form 'X' close button or is there a way to call the
databinding from default.aspx through javascript - or is there a simpler
way?....
-> Denis

May 11 '06 #2

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

Similar topics

1
by: Gilles T. | last post by:
Hi! I have a popup window open with the showModalDialog function: window.showModalDialog('dialog.aspx',window,"status:no; resizable:yes; dialogWidth:900px; dialogHeight: 700px;"); and in...
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...
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...
2
by: John | last post by:
Hi, I posted this earlier in microsoft.public.dotnet.framework.aspnet, but didn't get a response, so I thought I'd try here. Basically, I'm having a problem opening / downloading csv files...
9
by: Nathan Sokalski | last post by:
I have a very simple UserControl which contains an Image and a Label, which I use to display an image with a caption. I am using this control inside a DataList, setting the two Public variables...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
1
by: elizayiu | last post by:
Hi, I need to write a webpage which does the following: - open up a window and pass parameters into it (i.e. need to call showModalDialog() or showModelessDialog()) - contains jscript to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.