471,086 Members | 1,122 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,086 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 2991
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Simon Storr | last post: by
9 posts views Thread by Nathan Sokalski | last post: by
9 posts views Thread by Stan B | last post: by

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.