View Full Version : Refresh/reload a page by clicking a button in another page

01-19-2007, 10:17 AM

I am having following code in my parent.aspx

When one click on the LinkButton controll goes to child.aspx

Workes fine J.

<asp:LinkButton ID="lnkBtnAdd" runat="server" OnClientClick="OpenPopUp();">Add</asp:LinkButton><br />

And OpenPopUp() is as follws

function OpenPopUp()




But really I am adding some products to a grid View in parent.aspx.

So when one press a button in child.aspx

I want the parent.aspx to be refreshed.
(such that all added products [in child] shuld show on parent)

How can I do that.

In short:I want to refresh/reload a page by clicking a button in another page

Hope u can help me


01-19-2007, 01:15 PM
Add the following javascript into child.aspx

<script type="text/javascript">
function refreshOpener(){
if(opener && !opener.closed){

In your child.aspx, add the refreshOpener javascript function using OnClientClick to the button that will refresh parent.aspx

<asp:Button ID="bt" runat="server" Text="GO!" OnClientClick="refreshOpener()" />