Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
302 Points
92 Posts
Feb 23, 2012 04:21 PM|LINK
I know this is a really old thread but if anyone is looking...
I do exactly what is suggested above but I'm adding checkboxes.
However, these don't showup on the page...
<div id="dv1" runat="server"></div>
and then on the code behind:
CheckBox chk = new CheckBox(); chk.ID = "chk" + MyList.ItemID.ToString(); chk.Text = MyList.NameEn; chk.ToolTip = "some special tip for: " + MyList.NameEn; chk.Visible = true; dv1.Controls.Add(chk);
blmiles
Member
302 Points
92 Posts
Re: How to add dynamically an ASP:Control to a Div which is also created dynamically using C# cod...
Feb 23, 2012 04:21 PM|LINK
I know this is a really old thread but if anyone is looking...
I do exactly what is suggested above but I'm adding checkboxes.
However, these don't showup on the page...
<div id="dv1" runat="server"></div>
and then on the code behind:
CheckBox chk = new CheckBox();
chk.ID = "chk" + MyList.ItemID.ToString();
chk.Text = MyList.NameEn;
chk.ToolTip = "some special tip for: " + MyList.NameEn;
chk.Visible = true;
dv1.Controls.Add(chk);