Last post Dec 14, 2009 05:05 PM by Timeslice
Aug 02, 2009 12:38 PM|Vournelis|LINK
Hello everybody, after spending the better part of the day yesterday searching through the forums I believe I put together a solution for starting your ASP.NET application without the address bar, toolbars, etc.
There are many discussions about this in forums.asp.net but i could not find one that would give a clear answer so I decided to write this post and maybe I can save some time for the next person looking for this solution.
The problem: I cannot adjust the browser to hide the toolbar, menubar, address bar... when it is launched by the user and I desperately need the vertical space while all the browser add ons are useless for my application.
Solution: Create a splash screen (a new web form) and enter the folowing script in the "Load_Complete" event sub.
Note: Where 'UserLogin.aspx' you should type the name of the form that you wish to have as startup form. You can also adjust the duration that the splash screen will stay on by changing the value in the setTimeout function. I think '5000' will do 5 seconds.
Now set the splash screen as your startup form and run it.
In this examble the browser will start with all the toolbars showing and it will display your splash screen. In the mean time it will open a new window without the toolbars and after waiting 5 seconds, it will close the window that the user launched (splash
The problem was that without the statement window.open('','_self','');, Internet Explorer will prompt the user to confirm that the instance he/she launched is going to close.
This statement makes Internet Explorer think that the instance was launched through code and it closes without a message.
I would like to give credit to the programmer that posted the above statement on a forum but I went through so many forums that I could not find that post again. My apologies to the programmer.
Oct 14, 2009 11:47 AM|ktkrdl|LINK
You are my hero!!! This solution worked great! Thanks for posting it.
Nov 07, 2009 02:22 AM|koushik.dhar|LINK
Nov 18, 2009 11:06 PM|Spencer0|LINK
Thanks for the solution. It really worked. You are my hero man!!
Dec 14, 2009 05:05 PM|Timeslice|LINK
Works great in IE8 (and possibly IE7), however not in IE6.
Anyone tested this in IE7?
Any alternative that works in IE6?