Search code examples
c#browserreloadusing

Close Child Browser and Reload Parent Browser using C#


I have a Browser A from which when a link button is clicked Browser B is opened. In Browser B I have a grid in which I have a "Add Link button". In that Add Link button I am using OnClientClick for some Javascript Validation and OnClick for some submission. After OnClick If the submission is true passed I need to close that browser(B) and reload the Parent Browser(A).

I CAN'T USE JAVASCRIPT OnClientClick event on LinkButton as I am using it already. Is there any other way or else using C#, can I do that ??


Solution

  • Yeah, it worked finallly.. I modified the JavaScript function for relaoding/refreshing the Parent Window from reload to "window.opener.location.href = window.opener.location.href" then it stopped from warning popup -- Browser Reload Popup Warning

    I below line, it worked with out any pop up waring.. Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "window.opener.location.href = window.opener.location.href;self.close();");

    Thanks for your help & input..!!!