Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: What size is my page?

Reply
Thread Tools

Re: What size is my page?

 
 
Sabre
Guest
Posts: n/a
 
      07-02-2003
You could try this with js ...

In html page HEADER, something like ...

<script language="Javascript">
<!--
function displayRes()
{
document.Form1.scrWidth.value = window.screen.width;
document.Form1.scrHeight.value = window.screen.height;
}
-->
</script>
</HEAD>
<body bgColor="#ffefd5" onload="displayRes();" ms_positioning="GridLayout">

onload="displayRes();" calls the function. On your aspx you could do ...
Session("ScreenWidthpx") = scrWidth.Value

Session("ScreenHeightpx") = scrHeight.Value

or whatever.

Hope this helps
Graeme


"Fiona" <(E-Mail Removed)> wrote in message
news:047201c3403e$7eb9c640$(E-Mail Removed)...
> I need to know the dimensions of my page when it is
> loaded/reloaded, so that I can resize a panel displayed
> inside it accordingly. However I am unable to find any
> properties which will tell me this.
>
> Could anyone tell me how to find out the height and width
> of my page, and whether there is an event related to page
> resizing which I can catch? If it matters, I'm using c#.
>
> Thanks in advance.



 
Reply With Quote
 
 
 
 
Chris Becker
Guest
Posts: n/a
 
      07-02-2003
Take a gander at this tool on MetaBuilders:

http://www.metabuilders.com/Tools/ResizeMonitor.aspx

Just remember that you will not know the size of the window until the page
loads and posts back! You cannot know the size of the window on the first
request.

"Sabre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You could try this with js ...
>
> In html page HEADER, something like ...
>
> <script language="Javascript">
> <!--
> function displayRes()
> {
> document.Form1.scrWidth.value = window.screen.width;
> document.Form1.scrHeight.value = window.screen.height;
> }
> -->
> </script>
> </HEAD>
> <body bgColor="#ffefd5" onload="displayRes();"

ms_positioning="GridLayout">
>
> onload="displayRes();" calls the function. On your aspx you could do ...
> Session("ScreenWidthpx") = scrWidth.Value
>
> Session("ScreenHeightpx") = scrHeight.Value
>
> or whatever.
>
> Hope this helps
> Graeme
>
>
> "Fiona" <(E-Mail Removed)> wrote in message
> news:047201c3403e$7eb9c640$(E-Mail Removed)...
> > I need to know the dimensions of my page when it is
> > loaded/reloaded, so that I can resize a panel displayed
> > inside it accordingly. However I am unable to find any
> > properties which will tell me this.
> >
> > Could anyone tell me how to find out the height and width
> > of my page, and whether there is an event related to page
> > resizing which I can catch? If it matters, I'm using c#.
> >
> > Thanks in advance.

>
>



 
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
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
How to set the DataGrid Row Size to a fixed size. =?Utf-8?B?QmlkYXJrb3Rh?= ASP .Net 0 05-19-2005 08:14 PM
Using <asp:label font-size=16px...> ist not showing size in FireFox Browser Andreas Klemt ASP .Net 6 11-28-2004 09:21 PM
Dynamic Size for Text Box - Expanding more than the relative size Madhanmohan S ASP .Net 5 09-03-2004 06:28 AM



Advertisments