BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 

 
 Home
    Shop
    Advertise
    Write For Us
    Affiliate
    Newsletter
    Contact

How To Close Browser Window With Button Click?

To close a web browser you need to use client side JavaScript code. You can add it to OnClick attribute of Button control, like this:

[ C# ]

btnClose.Attributes.Add("OnClick", "window.close();");

[ VB.NET ]

btnClose.Attributes.Add("OnClick", "window.close();")



Related articles:

1. Using ADO.NET to Develop Data Access Logic (DAL)
2. ASP.NET 3.5 Project Development

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback



Copyright © 2002-2008 Bean Software. All rights reserved.