Hi,
My requirement is :
I am generating a div on button click and i want a dynamically generated rad combo box in that div. I am able to create a div and rad combo box but not able to put it in the div. Please check my code and provide some solution. Please i need solution as soon as possible.
.ASPX Page
My button :
<asp:Button runat="server" ID="btnAddDiv" ToolTip="+ Add Clause(s)" Text="+"
CssClass="btnAdd" onclick="btnAddDiv_Click"/>
Div :
<div id="testing" runat="server"></div>
.ASPX.CS Page
int Counter =0;
protected void btnAddDiv_Click(object sender, EventArgs e)
{
RadComboBox Box = new RadComboBox();
Box.ID = "RCB" + Counter;
Box.DataSource = ObjGetData.GetClause();
Box.DataValueField = "ClauseHeadingID";
Box.DataTextField = "ClauseHeadingType";
Box.DataBind();
testing.InnerHtml = testing.InnerHtml + "<div id='text" + Counter + "'> " + I WANT TO SHOW MY COMBO BOX HERE +"</div>";
Counter += 1;
}
I am doing this because i want to generate this div with combo box according to user dynamically and user can generate it infinite time.
Note: ignore my cap words. I just want to highlight my requirement.
Thanks
Manish
My requirement is :
I am generating a div on button click and i want a dynamically generated rad combo box in that div. I am able to create a div and rad combo box but not able to put it in the div. Please check my code and provide some solution. Please i need solution as soon as possible.
.ASPX Page
My button :
<asp:Button runat="server" ID="btnAddDiv" ToolTip="+ Add Clause(s)" Text="+"
CssClass="btnAdd" onclick="btnAddDiv_Click"/>
Div :
<div id="testing" runat="server"></div>
.ASPX.CS Page
int Counter =0;
protected void btnAddDiv_Click(object sender, EventArgs e)
{
RadComboBox Box = new RadComboBox();
Box.ID = "RCB" + Counter;
Box.DataSource = ObjGetData.GetClause();
Box.DataValueField = "ClauseHeadingID";
Box.DataTextField = "ClauseHeadingType";
Box.DataBind();
testing.InnerHtml = testing.InnerHtml + "<div id='text" + Counter + "'> " + I WANT TO SHOW MY COMBO BOX HERE +"</div>";
Counter += 1;
}
I am doing this because i want to generate this div with combo box according to user dynamically and user can generate it infinite time.
Note: ignore my cap words. I just want to highlight my requirement.
Thanks
Manish