Hiding IE browser toolbar with ASP.NET

  • Thread starter Thread starter Greg Williams
  • Start date Start date
G

Greg Williams

Anyone know a way to hide all IE's toolbars when and
ASP.NET page loads?? should I do this with Javascript or
can I use C# to do this.

thanks
 
Greg,

With my experience writing web applications, the only way to control the
showing of toolbars in a browser window is to handle it before the page is
loaded. I believe this is because the browser window itself is being built
client side. I have written several .Net web applications, and I handle
this by using a separate window to open the page that you want the user to
use. There may be a better way to do this, but I am not aware of it, so I
use VBScript to remove the toolbars of the desired page. Obviously you can
use JavaScript in place of the VBScript and achieve the same result.

For instance:
<SCRIPT LANGUAGE="vbscript">
window.open "WebPage.aspx","null","resizable=0"
</SCRIPT>

Obviously the down side to this is that you have a window open that you
don't really need, or even want. There may be some way to do this via
server side code using C# or VB, but I am not aware of it at this time, and
do not believe it is possible. I did look into for some time, and didn't
find anything, but I also didn't want to get wrapped around the axle with
something that seemed more trivial than the purpose of the application
itself.

Here is a link explaining the Window.Open method.
http://msdn.microsoft.com/library/d...hop/author/dhtml/reference/methods/open_0.asp

Hope this helps.

Anthony
 
Yes. That was my thinking also. didn't want to spend day's
trying to figure out a way to do this without having a
separate window open. Thought with .Net someone may have
figured a "cleaner" way to do this.

Thanks for confirming this.
 
Back
Top