Click here to Skip to main content
15,923,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
To Checked CheckBoxList item I am using following code:
C#
string pyDetails = objBiltyDetails.BltPayDetails.ToString();
            string[] split = pyDetails.Split(',');
            foreach (string item in split)
            {

                //if (item != "")
                //{

                    CheckBxPayDetails.SelectedValue = item;

                //}
            }

There are two values in item but only one check box is Checked.

Please help.
Posted
Updated 9-Jun-11 5:35am
v2

Have a look here[^].
 
Share this answer
 
Comments
Monjurul Habib 9-Jun-11 15:52pm    
nice link , my 5.
Abhinav S 10-Jun-11 0:34am    
Thank you.
 
Share this answer
 
v4
Comments
Abhinav S 10-Jun-11 0:34am    
More links to help the OP. 5.
Monjurul Habib 10-Jun-11 3:22am    
thank you.
go through below link u will get solution

http://www.dotnetcurry.com/ShowArticle.aspx?ID=77[^]

With Regards,
Ramamuni Reddy M
 
Share this answer
 
Comments
Monjurul Habib 9-Jun-11 15:39pm    
Edited: link
hello,

I think you have to use

CheckBxPayDetails.Items.FindByValue(item).Selected = true;


instead of
C#
CheckBxPayDetails.SelectedValue = item;
 
Share this answer
 
v2
see the below link
Link1[^]
Link2[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900