PC Review


Reply
Thread Tools Rate Thread

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

 
 
Vyacheslav Lanovets
Guest
Posts: n/a
 
      12th Aug 2005
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2FyYXZhbmFuIEsgVg==?=
Guest
Posts: n/a
 
      12th Aug 2005
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


--
Saravanan K V


"Vyacheslav Lanovets" wrote:

> 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
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
attribute or is not a valid attribute od element ListItem Dan Microsoft ASP .NET 2 2nd Aug 2008 10:28 PM
Add Attribute to CheckBoxList ListItem at runtime? CK Microsoft C# .NET 0 23rd May 2006 08:33 PM
Add Attribute to CheckBoxList ListItem at runtime? CK Microsoft ASP .NET 0 23rd May 2006 08:33 PM
how do I add an custom attribute to a listitem inside a dynamically created listbox? Rick Spiewak Microsoft ASP .NET 3 23rd Dec 2004 09:35 PM
Adding an data bindable attribute to option tag in ListBox Chuck Dascalos Microsoft ASP .NET 3 21st Mar 2004 02:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:03 AM.