Figuring out what checkboxlist was checked in the backoffice?
Hi everyone,
I made a checkbox list of a bunch of predefined values. I want certain aspects of the site to hide or be displayed based on if the user checked the box in the backoffice. The alias is called benefits, so when I do something like @CurrentPage.benefits, I get a comma dilemited string of everything I checked. How can I run tests on it, with say razer?
Figuring out what checkboxlist was checked in the backoffice?
Hi everyone,
I made a checkbox list of a bunch of predefined values. I want certain aspects of the site to hide or be displayed based on if the user checked the box in the backoffice. The alias is called benefits, so when I do something like @CurrentPage.benefits, I get a comma dilemited string of everything I checked. How can I run tests on it, with say razer?
End goal example: @{If (CurrentPage.benefits.1 == checked)
<div>something</div>
@If(CurrentPage.benefits.2 == checked......
Can anyone help with that?
Thanks!
Hi Brian
I think you should be able to use the .Contains method for this...so you can do something like
Does that work?
/Jan
Ah. Works nicely. Thank you!
is working on a reply...