473,662 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.showModa lDialog, 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.showModa lDialog.

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.showModa lDialog) 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 3071
Zak,
Try to call ExpirePageCache function on form_load:

private void ExpirePageCache ()
{
Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);
Response.Cache. SetExpires(Date Time.Now-new TimeSpan(1,0,0) );
Response.Cache. SetLastModified (DateTime.Now);
Response.Cache. SetAllowRespons eInBrowserHisto ry(false);
}

"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.showModa lDialog.

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.showModa lDialog) 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
4149
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 dialog.aspx, I need to print the page with javascript function window.print but this function don't work with the showModalDialog window. Why?
2
16125
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 showModalDialog. It is modal as far as the client is concerned but not the server... In my app I have a datagrid on the main aspx page, I pop up a modal dialog to edit a record. On closing the modal dialog I'd like to refresh the
6
5398
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 its AutoPostBack set to true and has its SelectedIndexChanged event being handled in codebehind. The event fires as it should populating two more ddls. The problem is, the two ddls appear empty. I have used a javascript alert to look at the...
1
3569
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 allows the user to open the page containing the link in a regular window or one opened via window.showModalDialog( ) 2. modal.htm provides a link to the aspx which generates the csv 3. csv.aspx generates a csv file
2
4388
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 when generated from within a page opened with window.showModalDialog( ) ( IE6 ). To isolate this problem, I've written 3 files (see below). 1. main.htm allows the user to open the page containing the link in a
9
2307
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 using attributes in the *.aspx page. Everything displays great for the initial load, but whenever I try to add or delete an item (I have controls to do this on the page), it does not seem to be recieving any values for the public variables. Here is...
9
4652
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();" + "}" + "</script>";
1
2712
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 support drag and drop objects from itself to the popup window - wait for user response in popup window and return results back to the parent window (i.e. calling showModalDialog() is preferred)
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.