How to refresh a page from another page in asp.net?

How to refresh a page from another page in asp.net?I have one page called Common.aspx.Once i click some button another page(Company.aspx)should refresh.How It possible?If Not ClientScript.IsStartupScriptRegistered(“ReloadPage”) Then ScriptManager.RegisterStartupScript(?,Me.GetType(), “ReloadPage”, “ReloadPage();”, True) End IfHere ReloadPage Function in company.aspx.I am wrting this code in …

via Asp.Net Developed Tutorials » Search Results » ajax:

How to refresh a page from another page in asp.net?

How to refresh a page from another page in asp.net?I have one page called Common.aspx.Once i click some button another page(Company.aspx)should refresh.How It possible?
If Not ClientScript.IsStartupScriptRegistered(“ReloadPage”) Then ScriptManager.RegisterStartupScript(?,Me.GetType(), “ReloadPage”, “ReloadPage();”, True) End If
Here ReloadPage Function in company.aspx.I am wrting this code in Common.aspx.It is possible to call?What i should write in ? Portion….
……………………………………..

You will need Company to poll the server somehow.
This can be done using Ajax and a Javascript timer.
First have Company.aspx check for a session variable on the server on the javascript timer interval events. You can do a full Postback if the variable is set to some value you’ve previously chosen.
Now have Common.aspx set that Session variable when you want to.
……………………………………..

The answer depends on how those pages are related. I guess that one of them opened the other, so if common.aspx launches company.aspx then you must get a handle of the opened window (the returned object of window.open)
var companyWindow = window.open(‘company.aspx’…and do
companyWindow.location.href = companyWindow.location.hrefIt common is launched by company then use window.opener. But this of course works only if you can control the window.open call. If you can’t then you must work on the solution by kervin

For more info: How to refresh a page from another page in asp.net?

Asp.Net Developed Tutorials » Search Results » ajax

How to refresh a page from another page in asp.net?

Share this post:

Related Posts

Leave a Comment