Home > Forum > ASP.NET > Need to close the window after click the button in asp.net

Need to close the window after click the button in asp.net

by celv   on Oct 20, 2014   Category: ASP.NET  |  Views: 2777    |  Points: 5   |  Bronze 
  Reply
Need to close the window after click the button in asp.net.

after click the close button i need to close my application.


and show the small window r u sure want to close the application if yes means need to close No means show the current page.

eg:in this http://dotnetgallery.com/ if we post a question they ask to procede the question ok or cancel

like this

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :Need to close the window after click the button in asp.net   
by Thamil
on Oct 20 2014 5:06AM
Points : 10
Gold 
hi celv,

Try with below code to close the current window.
<div>
<asp:LinkButton ID="lnkLogout" OnClientClick="Javascript:window.close();" runat="server">Logout</asp:LinkButton><br />
<input type="button" value="Logout" onclick="Javascrip:window.close();"/>
</div>

Thanks
  Re :Need to close the window after click the button in asp.net   
by celv
on Oct 21 2014 12:25AM
Points : 10
Bronze 
its not working in my localhost:8089 and also i

Need to close the window after click the button in asp.net.

after click the close button i need to close my application.


and show the small window r u sure want to close the application if yes means need to close No means show the current page.

eg:in this http://dotnetgallery.com/ if we post a question they ask to procede the question ok or cancel
  Re :Need to close the window after click the button in asp.net   
by Thamil
on Oct 21 2014 1:48AM
Points : 10
Gold 
Hi celv,

Provide your code here.
  Re :Need to close the window after click the button in asp.net   
by celv
on Oct 21 2014 2:36AM
Points : 10
Bronze 
<asp:Button ID="Button2" runat="server" Text="Close" OnClientClick="Javascript:window.close();"/>

http://localhost:50583/bramandam%20site/ExitEmployee.aspx

in this localhost its working fine . but in Localhost:8089 its not working

Recent Post

Latest Posts