Using ItemCreated for a Repeater in VB?

Discussion in 'ASP .Net' started by jason.gladstone@gmail.com, Mar 28, 2006.

  1. Guest

    Hello - I am trying to create a repeater control that contains a
    dropdownlist. A friend of mine sent me a sample in C#. I am trying to
    duplicate the sample in VB. This is the C# code in the OnLoad event:

    //bind the items to the repeater
    this.repeater.DataSource = items;
    this.repeater.ItemCreated += new
    RepeaterItemEventHandler(repeater_ItemDataBound);
    this.repeater.DataBind();

    Attaching the RepeaterItemEventHandler to ItemCreated is giving me
    problems. I want to use this in the OnLoad and not in the
    OnItemCreated in the repeater tag. Any clue how one would write the
    following line in VB:

    this.repeater.ItemCreated += new
    RepeaterItemEventHandler(repeater_ItemDataBound);

    Thanks,
    Jason
    , Mar 28, 2006
    #1
    1. Advertising

  2. Guest

    AddHandler repeater.ItemCreated, AddressOf repeater_ItemDataBound
    , Mar 28, 2006
    #2
    1. Advertising

  3. stone Guest

    That was it! Thank you!
    stone, Mar 29, 2006
    #3
  4. Guest

    You are welcome.
    , Mar 29, 2006
    #4
    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. =?Utf-8?B?S2V2aW4gSGVjdG9y?=

    Repeater ItemCreated vs ItemDataBound

    =?Utf-8?B?S2V2aW4gSGVjdG9y?=, Apr 11, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    9,922
    Teemu Keiski
    Apr 11, 2004
  2. Dennis E. Jones, Jr.

    Repeater - ItemDataBound and ItemCreated

    Dennis E. Jones, Jr., Nov 18, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    15,900
    Dennis E. Jones, Jr.
    Nov 18, 2005
  3. Philippe Camus
    Replies:
    2
    Views:
    2,504
    Philippe Camus
    Mar 30, 2006
  4. Stephen Miller

    Using the DataGrid's ItemCreated event on PostBack

    Stephen Miller, Mar 3, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    265
    Stephen Miller
    Mar 3, 2004
  5. Thomas Nielsen [AM Production A/S]

    Repeater/ViewState: how to preserve properties on controls set on ItemCreated?

    Thomas Nielsen [AM Production A/S], Dec 1, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    353
    Thomas Nielsen [AM Production A/S]
    Dec 2, 2003
Loading...

Share This Page