Setting attributes for dynamically created dropdownlists

Discussion in '.NET' started by shivam, Aug 20, 2007.

  1. shivam

    shivam

    Joined:
    Aug 20, 2007
    Messages:
    3
    Likes Received:
    0
    Hello,

    I've tried various methods but none seem to work for me. Any help would be greatly appreciated.

    I am trying to dynamically set the "onchange" attribute for dropdownlist to call another fucntion. Here's what I have:

    Code (Text):
    filter.Attributes.Add("OnChange", "getoptions");
    I've seen other people use the same code and it seems to be working for them, however for me it's doing nothing.

    "filter" is a dynamically created dropdownlist which is being created when a postback function is called, I need to set the "onchange" attribute and then add the control to a repeater item's collection.

    Please Help!

    Thanks,
    Shivam.
     
    shivam, Aug 20, 2007
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.