Nagendra
Nagendra

Reputation: 31

How to add custom attributes for items in a CheckBoxList?

I have a requirement of showing the check box list. And for each check box item, I have to store a custom attribute (apart from text and value) which I will use to compare in button click event.

Please suggest me better approach

thanks in advance..

Upvotes: 3

Views: 1029

Answers (1)

danyolgiax
danyolgiax

Reputation: 13116

You can concatenate the custom value with the value of the checkbox separating them with a well-known character or set of chearacters. You can then retrieve and split values from the request.

Upvotes: 3

Related Questions