Chris
Chris

Reputation: 470

Get DIV height from c#

Is it possible to get the height of rendered DIV without using JavaScript?

Reason is using the following code to get return html of a page but none of JavaScript fires:

Server.Execute(url, htmlStringWriter);
string htmlCodeToConvert = htmlStringWriter.GetStringBuilder().ToString();

Upvotes: 1

Views: 868

Answers (1)

MattW
MattW

Reputation: 4628

In the general case, no it is not possible. The philosophy behind HTML has always been that browsers have some freedom of choice in rendering it. So no, you cannot predict what the user's browser is going to do with your div.

Upvotes: 1

Related Questions