Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sudeer 24 posts 42 karma points
    Nov 30, 2011 @ 07:04
    sudeer
    0

    Add "title" attribute to the dropdown

    Hi,

    i have a dropdown list and i am adding some list items dynamically..while adding some items i am adding the "title" attribute also, but when the dropdown list rendered i am not able to set the attribute value. Code is

    foreach (var language in languages)
                {
                  
                    var newListItem = new ListItem("english","en-US");
                    newListItem.Attributes.Add("title","/image/en-us.gif");

                    ddlselect.Items.Add(newListItem);
                }

Please Sign in or register to post replies

Write your reply to:

Draft