Tuesday, March 13, 2012

Switch Off IE (Internet Explorer) Toolbars?

Hi All,

Can anoyone tell me how to:

Switch Off IE (Internet Explorer) Toolbars when my browser windo opens in my application.

crte a button that will close my page

cheers

any help most appreciated

rgs

TonyHi Tony,
You can not do it in current window. You can instead open new window without toolbars and close current. Seethis.
Hi

Thanks for that, just one question...where do I insert in in the asp.net page as I already have script tags with asp.net in them!!!

many thanks

Tony
Hi,

I have use default.aspx that redirects to app mainpage:

private void Page_Load(object sender, System.EventArgs e)
{
string apu = "/Application/AppMainPage.aspx";

string Script = "";

Script += "\n<script language=JavaScript id='StartMainWindow'>\n";
Script += "poppedwin = window.open('"+apu+"','Appmain','resizable=yes, width=1024,height=768,statusbar=no'); \n";
Script += "mainwindow = window.self; \n";
Script += "mainwindow.opener = window.self; \n";
Script += "mainwindow.close(); \n";
Script += "poppedwin.focus(); \n";
Script += "</script>";

Response.Write(Script);
Response.End();
}

I hope this helps.

- Antti -
Hi Tony,
You can insert client script tag anywhere you want (and more then one). Client script tags have no runat="server" attributes and processed differently from server side asp.net script tag.

0 comments:

Post a Comment