I have a table like this:
<table>
<tr>
<td id='tdleftcontent' style='border:1px solid red;'>
<asp:Label ID='lbl' runat="server"></asp:Label>
</td>
</tr>
</table>
With control lbl, in code behind, I set text as 'img src='/CMS/Images/News/event1.JPG' border='0' />'
protected void Page_Load(object sender, EventArgs e)
{
this.lbl.Text = "<img alt='' src='/CMS/Images/News/event1.JPG' border='0' />";
}
And in Javascript, I have a function to get HEIGHT of this td:
<script type="text/javascript">
$(document).ready(function(){
var h = document.getElementById('tdleftcontent').offsetHeight;
alert(h);
});
But the result is: h=22px. It mean the image does not show up on web yet. result picture: http://upanh.nguoihoian.info/di-534E.jpg
Please help me in solve this problem. Thank you very much.