How to get the page/window's height and width

R

ree32

Through ASP.net?

I am trying to dynamically set the an iframe's (located on the aspx
page) height and width. I would like to know the pae windows height &
width.

I dont want to achieve this using clientside as there is a lot of
other code behind.

Thanks
 
A

Alessandro Zifiglio

You cant achieve this server side only. The client screens width and height
varies on various factors like the screen resolution, and you can retrieve
these values only in script client side. This will require that you check
the clients screen width/height in script, add the values in a hidden field
or the querystring, make one postback to the server to pass it the values.
Your server side code will need to retrieve the values from the hiddenfield,
or the querystring. There is no alternative. This is a clientside
functionality.

Regards,
Alessandro Zifiglio
http://www.dotnetbox.com (The custom web control that lets you drag and
resize content on your pages like as if you were in Visual Studio.NET
designer.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top