Hi,
I am trying to do design in code behind file. Suppose --
---------------------------------------------------------------------------------------------------
<div id='dv1' runat='server' style='margin-top: 15px;'>
Test Content
<div>
---------------------------------------------------------------------------------------------------
is design page, but I am trying it in code behind file like this --
---------------------------------------------------------------------------------------------------
System.Web.UI.HtmlControls.HtmlGenericControl dv1 = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
dv1.ID = "dv1";
dv1.Style.Add("margin-top", "15px");
this.Controls.Add(dv1);
public string str1 += dv1
public string str1 += "Test Content"
---------------------------------------------------------------------------------------------------
str1 is my public string which will be used in aspx design. Now the question is how to close this div element and how can I put my other controls between starting div tag and ending div tag.
Thanks in advance.