C# Render HTML to get element's height -
i need create html page c# code html agility pack. want if element i'm trying write cannot fit div specific height, must create new div , close other 1 (like paging if want). big concern how know height of element inside c#, assume i'm force render somewhere css associated, how?
one way using html renderer webkit.net.
you able call javascript in retrieve dom objects properties heights, position, etc...
once have set , rendered content want test (tutorial here), use stringbyevaluatingjavascriptfromstring
function access javascript functions.
string height = webkitbrowser1.stringbyevaluatingjavascriptfromstring("$('#divid').height().tostring()");
note need return string value function not return other types.
Comments
Post a Comment