Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to remove menu/tool bars and fix size of page

Reply
Thread Tools

How to remove menu/tool bars and fix size of page

 
 
moondaddy
Guest
Posts: n/a
 
      05-18-2007
How can I remove all menu and toolbars from a web page (aspx) and fix the
size of the page?

Thanks.

--
http://www.velocityreviews.com/forums/(E-Mail Removed)am


 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-18-2007
Hi moondaddy,

This have to be done at client-side using javascript. Please try following
test to see if it helps for your requirement:

1) Create a simple html file named 'close.htm' with following content:

<html><body>
<script language="JavaScript">window.close();</script>
</body></html>

This is to workaround the prompt when closing the current window using
javascript. I found this workaround here:
http://forums.microsoft.com/MSDN/Sho...62189&SiteID=1

2) In your default.aspx.cs:

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack && Request.QueryString["open"] != "1")
{
ClientScript.RegisterStartupScript(GetType(), "open",
"window.open('close.htm', '_self'); window.open('Default.aspx?open=1',
'_blank', 'height=640, width=480, menubar=no, toolbar=no')", true);
}
}


This will re-open default.aspx within a popup window that has removed the
menubar and toolbar.

#open Method (window)
http://msdn2.microsoft.com/en-us/library/ms536651.aspx


Hope this helps.


Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      05-23-2007
Please feel free to let me know if there's anything else I can help.


Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Using a div with scroll bars - can we get the scroll bars on the left instead of the right side? UJ ASP .Net 1 11-01-2006 09:32 PM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM



Advertisments