How to show Checked Value of listitem in updatable form
I got only one value of ListItem so how to get multiple values so that all checked value will be shown in updatable form
Code :
style="margin-right: 0px" >
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanket JainPosted Dec 30, 2014, 2:01 AM
But when I open this form in Updatatble mode then how to show checked symbol in both values i.e. aaa,bbb
Right now I'm getting only one checked value in design so how to show both checked value in design mode
Manish Kumar ChoudharyPosted Dec 29, 2014, 3:38 AM
Hi Sanket Jain,
Try this
var list = chk1.Items
.Cast<ListItem>()
.Where(item => item.Selected == true)
.Select(item => item.Value);
var SelectedValue = string.Join(",", list);
Khargesh RajputPosted Dec 29, 2014, 3:37 AM
for (int i=0; i
if (checkboxlist1.Items[i].Selected)
{
chkvalue += checkboxlist1.Items[i].Text + "
";
}
}