I am trying to add a control (div) dynamically to a web page:
HtmlControl divControl = new html HtmlGenericControl("div");
divControl.Attributes.Add("id", lb.Items[i].Value);
divControl.Attributes.Add("innerHtml", "bob");
divControl.Visible = true;
this.Controls.Add(divControl);
But how can I set the text (innerhtml) of the control itself, since it does not look like innerHtml, since the attribute does not exist and there are no "value" or "text" parameters shown?
thank
source
share