Click event in a datalist to post back datalist properties

Discussion in 'ASP .Net' started by Steve Lloyd, May 25, 2004.

  1. Steve Lloyd

    Steve Lloyd Guest

    Hi there,

    I have built a data list that contains dropdownlists that are populated
    depending on details of the item in the datalist by adding a datasource to
    the drop downs as part of the itembound event, which has all worked very
    nicely... My problem is that i want to use a click event on a LinkButton
    that is part of the datalist item and use the information selected in the
    combobox as part of the server side click event.

    can anyone point me in the right direction pls.

    Thanks for any help.

    Steve Lloyd
    Steve Lloyd, May 25, 2004
    #1
    1. Advertising

  2. Steve Lloyd

    Rick Spiewak Guest

    During the page load event, if it is a postback, check for the edititemindex
    <> -1. This means that you are in edit mode.
    Use the edititemindex to get to the correct "row" in the datalist, and find
    the LinkButton control - easier if you use a template,
    so you'll know what its ID is. Add the event handler to the LinkButton at
    this point.

    "Steve Lloyd" <> wrote in message
    news:...
    > Hi there,
    >
    > I have built a data list that contains dropdownlists that are populated
    > depending on details of the item in the datalist by adding a datasource to
    > the drop downs as part of the itembound event, which has all worked very
    > nicely... My problem is that i want to use a click event on a LinkButton
    > that is part of the datalist item and use the information selected in the
    > combobox as part of the server side click event.
    >
    > can anyone point me in the right direction pls.
    >
    > Thanks for any help.
    >
    > Steve Lloyd
    >
    >
    Rick Spiewak, May 26, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    828
    Purvi T
    Oct 19, 2004
  2. Joby
    Replies:
    0
    Views:
    1,627
  3. Chu
    Replies:
    2
    Views:
    902
    Winista
    Apr 10, 2006
  4. =?Utf-8?B?Z29yaWxsYQ==?=
    Replies:
    1
    Views:
    763
    Masudur
    May 25, 2007
  5. Max2006
    Replies:
    2
    Views:
    1,563
    Walter Wang [MSFT]
    Sep 19, 2007
Loading...

Share This Page