System.Web.UI.HtmlControls.HtmlGenericControl itemdiv = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
itemdiv.ID = "NewDiv";
itemdiv.InnerHtml = "" +
"<table width=\"100%\"><tr>" +
"<td width=\"75%\"><a class =\"StandardLinks\"href=\"ViewItem.aspx?itemid=" + Itemid + "\">" + Name + "</a><br></br>" +
"Posted by:" + Userid + "</td>" +
"<td style=\"text-align: right\">Price:" + Price + "</td>" +
"</tr></table>";
this.Cell2.Controls.Add(itemdiv);
I want to dynamically remove the added control in the button click event...Please help.
itemdiv.ID = "NewDiv";
itemdiv.InnerHtml = "" +
"<table width=\"100%\"><tr>" +
"<td width=\"75%\"><a class =\"StandardLinks\"href=\"ViewItem.aspx?itemid=" + Itemid + "\">" + Name + "</a><br></br>" +
"Posted by:" + Userid + "</td>" +
"<td style=\"text-align: right\">Price:" + Price + "</td>" +
"</tr></table>";
this.Cell2.Controls.Add(itemdiv);
I want to dynamically remove the added control in the button click event...Please help.