setting size of browser window when web app is loaded?

  • Thread starter Thread starter msnesw.microsoft.com
  • Start date Start date
M

msnesw.microsoft.com

How can I set the size of the browser window when I invoke my aspx page from
a link? Can it be done through .net?
It currently maintains the same size from the last time it was opened.

Thanks.
 
You can do this via JavaScript/ECMAScript or JScript or VBScript

Create a function

function SetWindowSize() { /* size the window */ }

and in the HTML <BODY> element add the functionas an onLoad EventHandler

<BODY onLoad="SetWindowSize();">

OR
==

if you have control over the page that is invoking your asp.NET application,
instead of using a simple hyperlink, use a function

function OpenLinkAndResizeWindow(URL)
{
window.open( ... ... );
}

Hope this helps :o)) -but it's not really a C# (or even a .Net) question.
 
Back
Top