Reputation: 419
Suppose I'm opening email details in a ASP.Net .aspx page div control. The problem is when I'm opening an email details containing html tag the page is showing messed up. Only the inner html contents are showing on the page. Is there any way I could solve this problem.
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form >
<!-- Outer HTML contents... -->
<div id="dvViewMailReadOnly" style="overflow:auto; width:100%;height:auto;">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<img src="http://click.email.skype...>
</body>
</html>
</div>
</form>
</body>
</html>
The email contents are showing on dvViewMailReadOnly dynamically.
Upvotes: 1
Views: 342
Reputation: 1495
I'm still not sure I understand the problem. Yes, the HTML is invalid, as there must only be one <html>
element (and consequently also only one <head>
and <body>
element).
If you are allowed to modify your form, then you could simply do this:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form >
<!-- Outer HTML contents... -->
<div id="dvViewMailReadOnly" style="overflow:auto; width:100%;height:auto;">
<img src="http://click.email.skype...">
</div>
</form>
</body>
</html>
Upvotes: 1