J
j
Hi,
I would like to persist 3 values to each of my ListItems, Value, Text, and a
third value so that on postback I can reference them. I would think I could
use the li.Attributes.Add("Key",value) in my C# code when I create the
ListItem so that on the postback I could reference li.Value, li.Text, and
li.Key. However, the added Attribute does not become an attribute on the
rendered HTML (which is an <OPTION> ). Therefore, the Key attribute is lost
for the postback.
Am I missing something? It would seem that this would be part of the
Attributes class. I used this technique in DHTML coding (I think it was
refered to as Expando?) and wonder if Attributes supports what I am trying
to do across postbacks?
Thank you
I would like to persist 3 values to each of my ListItems, Value, Text, and a
third value so that on postback I can reference them. I would think I could
use the li.Attributes.Add("Key",value) in my C# code when I create the
ListItem so that on the postback I could reference li.Value, li.Text, and
li.Key. However, the added Attribute does not become an attribute on the
rendered HTML (which is an <OPTION> ). Therefore, the Key attribute is lost
for the postback.
Am I missing something? It would seem that this would be part of the
Attributes class. I used this technique in DHTML coding (I think it was
refered to as Expando?) and wonder if Attributes supports what I am trying
to do across postbacks?
Thank you