Inserting new values to checkboxlist in Jaavascript
-
How can I add new values to checkboxlist control of ASP.NET? I have done this by dropdown and listbox controls before but it's several days that I can't do this task. Please help me everyone.
-
How can I add new values to checkboxlist control of ASP.NET? I have done this by dropdown and listbox controls before but it's several days that I can't do this task. Please help me everyone.
Hi, Check this link... http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist.checkboxlist(vs.80).aspx[^]
P.Anbuselvan IT Consultant Emirates Group IT, UAE
-
Hi, Check this link... http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist.checkboxlist(vs.80).aspx[^]
P.Anbuselvan IT Consultant Emirates Group IT, UAE
Hi sir!! I said in JAVASCRIPT.
-
Hi sir!! I said in JAVASCRIPT.
You are right! :) Here is a JavaScript sample. Markup Part: ========= function AddMoreItems() { var newNode = null; var objList = document.getElementById('CheckBoxList1'); if (objList != null) { var tblBody = objList.getElementsByTagName('TBODY'); newNode = tblBody[0].rows[tblBody[0].rows.length-1].cloneNode(true); if (newNode != null) tblBody[0].appendChild(newNode); } return false; }
Code Behind Part: ============= protected void Page_Load(object sender, EventArgs e) { CheckBoxList1.Items.Add(new ListItem("Hello")); CheckBoxList1.Items.Add(new ListItem("Welcome")); submitBtn.Attributes.Add("onclick", "return AddMoreItems();"); } I hope you got some idea! Enjoy! P.Anbuselvan IT Consultant Emirates Group IT, UAE
-
How can I add new values to checkboxlist control of ASP.NET? I have done this by dropdown and listbox controls before but it's several days that I can't do this task. Please help me everyone.
-
Hi, You can add ListItem to CheckBoxList in Javascript: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Regards, Blumen