Skip to content
Loading
Create runtime div
        HtmlGenericControl div = new HtmlGenericControl("divRuntime");
      
        string finalHTML = prefix.ToString();
        for (Int32 i = 0; i < datatable.Rows.Count; i++)
        {
            finalHTML += "
  • " + "

    " + datatable.Rows[i]["Headline"].ToString() + "

    " + datatable.Rows[i]["Year"] + "
  • ";
            }
            finalHTML += suffix.ToString();

            div.InnerHtml = "";

            div.InnerHtml = finalHTML.ToString();
            form1.Controls.Add(div);
  • Sanjay Kumar
  • Jaganathan Bantheswaran
    Are you using jQuery?

    can you post some code?
  • Nitin Bhardwaj
    how to delete old runtime create div?
  • Jaganathan Bantheswaran
    It wont replace but creates again. So delete the old one & create it again.

    What are you trying to achieve here?