473,561 Members | 3,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the values of checkbox(es) checked in a checkboxlist

Hi All,
I am using CallBack feature in ASP.NET 2.0 and I am running into a
problem with checkboxlist control.

I have to find out which checkboxes are checked and get their values at
client-side(using JavaScript) but always I get a value
"undefined".... this code works for all other controls except
checkboxlist and radiobuttonlist controls. I am pasting my code below
Please let me know wht am i doing wrong.

At Server Side:-
chkBoxList.Attr ibutes.Add("onc lick", "UseCallBac k('" &
chkBoxList.Uniq ueID & "');")

At ClientSide:-
function UseCallBack(cnt rlName)
var cntrlID = cntrlName.split ("$") ;
var cntrlValue = listValues(cntr lName);
var cntrlNameValue = cntrlID + '~' + cntrlValue;
GetCallBack(cnt rlNameValue, "");


function listValues(obje ctName)
var list = null;
for (var i=0; i<objectName.le ngth;i++){
if (document.getEl ementById(objec tName[i]).checked)
list += objectName[i].value + ',';
return list;

After the Values are determined I am grabbing the values on
ServerSide's RaiseCallBack Event method.
Please Help!!!!


Jul 28 '06 #1
2 1587
I am still struggling with this problem........ .. any ideas???

Jul 31 '06 #2
See this at: http://aspnet.4guysfromrolla.com/articles/050703-1.aspx

<ri************ ****@gmail.comw rote in message
news:11******** **************@ s13g2000cwa.goo glegroups.com.. .
>I am still struggling with this problem........ .. any ideas???

Aug 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: John Mullen | last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ? <li>ABACAVIR SULFATE</li> <INPUT NAME="ingredient0" TYPE=checkbox VALUE="ABACAVIR SULFATE"><br> <input name="ABACAVIR SULFATE AMOUNT" type="radio"...
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! How do I convert a CheckBox.Checked to an int? Regards Martin Arvidsson
by: AFN | last post by:
I want to click a checkbox and have a 4 line (approx) paragraph appear beneath the checkbox, pushing the rest of the page down. And when unchecking the checkbox, the paragraph should disappear and the part below should push back up again. How?
by: Kevin | last post by:
Hi, I have a input with type checkbox. I want it to be automatically checked if the value from the corresponding field in the database is also checked. I tried this: <% set objdc = Server.CreateObject("ADODB.Connection") etc ... sql="select maa13 from mytable" dim rsArray
by: RodBillett | last post by:
I have a situation where I have 3 checkboxes - and at least 1 needs to be selected at all times... I have implemented the code that allows this behavior to happen, BUT Viewstate gets all messed up. As long as none of the checkboxes are disabled, viewstate works fine - and client actions are 'remembered' after a postback. but when I have...
by: yurps | last post by:
Hello I have a DataList like this <asp:DataList id="Questions" Runat="server"> <ItemTemplate> <table border="1"> <tr> <td> <asp:CheckBox ID="Yes" Runat="server"></asp:CheckBox> <input type="hidden" runat="server" value='<%# DataBinder.Eval(Container.DataItem, "I_QUESTION_ID") %>' ></input>
by: Patrick Olurotimi Ige | last post by:
I 'm databinding a CheckBoxList control Can somebody forward me a sample how to get if a checkBox is selected i want to return TRUE and if not FALSE? Thanks *** Sent via Developersdex http://www.developersdex.com ***
by: rishabhshrivastava | last post by:
Hey All, Can someone suggest me a way to get the values of CheckBox(es) selected in a CheckBoxList control using JAVASCRIPT. I am pasting my current code gere but its not working need some suggestions pls. function CheckBoxList(cntrlName) { var cntrlValue = listValuesCheckBox(cntrlName); return cntrlValue ;
by: nologo | last post by:
All, Have a problem i just cant find the answer for. I'm trying to populate a colum in a SQL database. Basically the column requires a 1 or 0. I'm trying to populate this col via a c# checkbox. so basically: checkbox.checked =1 else
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.