Hi,
I have created a div tag with id and runat server, when the code is inserted from the server side(c#) using inner html of div, the code is inserted, but the data is not shown.
ex.
HTML Code:
<div id="content_container" runat="server" class="xyz">
</div>
C# code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GenerateHTMLCode();
}
}
public void GenerateHTMLCode()
{
content_container.InnerHtml = "<div > " +
"<p> " +
"<a " +
"<asp:Image id=\"xyz\" class=\"xyz\" src=\"\\images\\Blue hills.jpg\" alt=\"\" ></asp:Image> " +
"</a> Hi This is xyz!</p> </div>";
}