Click here to Skip to main content
16,009,238 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi sir,
Tell me the steps to close the popup window using the button click in asp.net c#. Kindly give me the solution for
this problem.
Posted
Updated 24-Jul-13 22:44pm
v2

which kind is the popup window?

1.post the following string to the window that need to be closed .

<a href="javascript:window.close()"></a>

then let the window response this string .

2.click the link
http://go4answers.webhost4life.com/Example/close-pop-refresh-main-page-popup-close-84434.aspx[^]
 
Share this answer
 
v2
You can have this:

btnSave.Attributes.Add("OnClick", "Javascript:self.close();");
 
Share this answer
 
using javascript closing popup window on button click is very easy


JavaScript
<asp:button id="btnid" runat="server" onclientclick="window.close();" xmlns:asp="#unknown" />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900