add my attribute to a listitem (<option>) in a listbox

  • Thread starter Vyacheslav Lanovets
  • Start date
V

Vyacheslav Lanovets

Hello, All!

Can anybody suggest how can I add my custom attribute to listitem in order
to display it on the _client_ machine so as to javascript can use it?

I can change text and value, and it gets displayed on the client browser,
but changing ListItem.Attributes does not produce any effect.

Please help :)

Best regards,
Vyacheslav Lanovets
 
G

Guest

Hi,

There is a work around for this.

If you want to have additional info with a list item, we can append the info
to the value with a separator like '|'. Whenever you need to get the value,
you need to split the value with the separator and get the value and the
additional info on both client side and server side
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top