Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using ItemCreated for a Repeater in VB?

Reply
Thread Tools

Using ItemCreated for a Repeater in VB?

 
 
jason.gladstone@gmail.com
Guest
Posts: n/a
 
      03-28-2006
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

 
Reply With Quote
 
 
 
 
jan.hancic@gmail.com
Guest
Posts: n/a
 
      03-28-2006
AddHandler repeater.ItemCreated, AddressOf repeater_ItemDataBound

 
Reply With Quote
 
 
 
 
stone
Guest
Posts: n/a
 
      03-29-2006
That was it! Thank you!

 
Reply With Quote
 
jan.hancic@gmail.com
Guest
Posts: n/a
 
      03-29-2006
You are welcome.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Repeater.ItemCreated is fired before Page_Load on postback Philippe Camus ASP .Net 2 03-30-2006 12:57 PM
Repeater - ItemDataBound and ItemCreated Dennis E. Jones, Jr. ASP .Net 4 11-18-2005 05:45 PM
Repeater ItemCreated vs ItemDataBound =?Utf-8?B?S2V2aW4gSGVjdG9y?= ASP .Net 1 04-11-2004 12:23 PM
Using the DataGrid's ItemCreated event on PostBack Stephen Miller ASP .Net Datagrid Control 0 03-03-2004 03:09 AM
Repeater/ViewState: how to preserve properties on controls set on ItemCreated? Thomas Nielsen [AM Production A/S] ASP .Net Web Controls 2 12-02-2003 10:04 AM



Advertisments