tags:

views:

36

answers:

1

I'd like to be able to load a page up and once all the content is added see how high it is and include that as a hidden parrameter to be picked up later. Is there a way to do this?

[NOTE] Just to clarify, I have to do this n code behind because it has to be retrieved via webrequest object.

+2  A: 

Sure thing. With jQuery:

$('#item').data('height', $('#item').height() );

#item's height (in the box model sense, not including padding) will be stored by $().data as a property of itself available for later JavaScripting.

cpharmston
That's great except that I MUST be able to get this parameter without running scripts on the client.
Middletone
Sorry to be the bearer of bad news, but there's no way to do this on the server side - there are too many variables. Some include: browser's level of CSS support, window width, browser- and platform-specific font rendering differences, fonts installed on the client's system, user stylesheets, and user scripts.
cpharmston