iframe add html content code example
Example 1: put html in iframe
<iframe srcdoc="<html><body>Hello, <b>world</b>.</body></html>"></iframe>
Example 2: iframe set html content c#
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["srcdoc"] = "<h1>Contents Changed</h1>";
}