I want to assign the html content to iframe control from asp.net code behind page;
this is working fine
myIframe.Attributes.Add("src", "pathtofilewith.html");
but, i don't want to give the path of html file to display i just want to assign some html content which comes from database to iframe control.
i want some thing like this(pramod) to be displayed in iframe control
i tried the bellow ways but nothing is succesful
1) myIframe.Attributes["innerHTML"] = "
Thank You..
";2) myIframe.Attributes.Add("innerHTML", "
Sam HobbsPosted Mar 17, 2012, 6:38 PM
My guess is that you are doing this too late. I assume the iframe already exists when you do that so the Attributes have no affect. If it already exists then you need to set the document's innerHTML (or perhaps the document's body's innerHTML) to the HTML.