Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd error with ItemDataBound 1

Status
Not open for further replies.

TeaAddictedGeek

Programmer
Apr 23, 1999
271
US
I'm getting an error with an ItemDataBound event. Here's the code:

override protected void OnInit(EventArgs e)
{
base.OnInit(e);
rtASAP.ItemDataBound += new RepeaterItemEventHandler(rtASAP_ItemDataBound);
}

private void rtASAP_ItemDataBound(object source,
RepeaterCommandEventArgs e)
{


The error is "No overload for 'rtASAP_ItemDataBound' matches delegate System.Web.UI.WebControls.RepeaterItemEventHandler'" and it points to the line "new RepeaterItemEventHandler(rtASAP_ItemDataBound)". Given that this code is identical to various examples out there in similar help forums, I'm at a loss as to why it doesn't work.

Thanks!

"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs."
-Joseph Weizenbaum
 
you have the wrong signature.
Code:
override protected void OnInit(EventArgs e)
{
   base.OnInit(e);
   rtASAP.ItemDataBound += new RepeaterItemEventHandler(rtASAP_ItemDataBound);
}

private void rtASAP_ItemDataBound(object source, [COLOR=green][b]RepeaterItemEventArgs[/b][/color] e)
{
}

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thank you! The sad and scary part was that I found the exact code in several online examples of what was supposed to have been working code. But this is why I come here. ;)

"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs."
-Joseph Weizenbaum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top