Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I seem to have a bit of trouble to add values to the checkbox list style. I have done a search on the forum and on google, but it still doesn't work for me :/
I have a set of prevalues for the checkbox list and I want to store the checked values on a given node when a frontend user clicks the "Save button"
The following code should set the values:
string listValues = string.Empty;
foreach (ListItem listItem in cblCategories.Items)
listValues += listItem.Value.ToString() + ',';
if (listValues != string.Empty)
adDoc.getProperty("kategorier").Value = listValues;
If I try to switch the datatype in Umbraco to a textstring instead of the checkbox list, it writes the values as expected! So eventually they are able to be stored after a postback - or so it seems ;)
This is how I bind my checkbox list in Page_Load:
Node buySaleNode = new Node(1108);
string cbl = buySaleNode.GetProperty("kategorier").Value;
string categoryStrings = cbl.Split(',');
cblCategories.DataSource = categoryStrings;
I've also tried to bind the asp checkboxlist in the Page_Init event, but that didn't work either.
Have I missed something here? :)
Any hint/help on this is appreciated! Thanks!
All the best,
Hi Bo I am also having this issue, I have changed to textstring and my comma delimited list is saved OK. How did you end up resolving this?
Glad you asked, I completely forgot about this post :-)
The way I solved it was this:
The link does not work anymore.
Can you help us with snippet here?
How did you manage to do this? did you follow the article that Bo published?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted