Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close Application on Button click in ASP.NET w/ VB

Status
Not open for further replies.

bubberz

Programmer
Dec 23, 2004
117
US
How do I close the application with a button click event?
I'm new to .NET, but have experience with ASP 3.0
Thanks!
 
close the application
You mean the web browser? If you do it's not as simple as that. The server doesn't have access to the client's browser so it would have to be done in javascript and there are security warnings that will be issued if you try (it can still be done though).

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I'd just want them to close the web site there in at the moment
 
I'd just want them to close the web site
You can't close a web site! You can either:

[ol]
[li]Close the browser[/li]
[li]Redirect them to another site[/li]
[/ol]


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
what do you want them to see/do?

Logout?
Close Window? btn.attributes.add("onclick",javascript:window.close();")
--this will give you a 'Do you want to close' if not in a popup window...
Redirect?

hmmm..

"...we both know I'm training to become a cagefighter...see what happens if you try 'n hit me..."
 
Well, first I need to get out of the desktop mind frame. Yeah, we'll probably need them to log-out since we'll be implementing that.
 
it sounds like you need to figure out what your app is all doing and how you'd like you application to "END"...

"...we both know I'm training to become a cagefighter...see what happens if you try 'n hit me..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top