Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > No overload error???

Reply
Thread Tools

No overload error???

 
 
Gary Wardell
Guest
Posts: n/a
 
      06-09-2008
HI,

I'm getting this error:

No overload for 'DoItemUpdated' matches delegate
'System.Web.UI.WebControls.DetailsViewUpdatedEvent Handler'

on line=22

Line 22 reads:

<aspetailsView ID="DetailsView1" runat="server" AutoGenerateRows="false"
style="top: 25px; left: 15px; position: absolute; width: 622px"
DataSourceID="SqlDataSource3"
AutoGenerateEditButton="true"
AutoGenerateDeleteButton="true"
AutoGenerateInsertButton="true"
OnItemUpdated="DoItemUpdated"
>


The function in the code behind reads:

protected virtual void DoItemUpdated(DetailsViewUpdatedEventArgs Args)
{
lblMsg.Text = " Record " + Args.Keys["BookID"] + " updated";
}

Since I am a bit new to ASP.net and C# I'm at a loss as to what it's trying
to tell me?

Is it saying it can't find the function?

Is it saying that the definition of the function doesn't match what is
expected?

I've tried different definitions, the message doesn't change.

It can find the Page_Load function in the same file which has a similar
definition.

Gary




 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      06-10-2008
You're missing a parameter in the event. Most events also take a parameter
called sender, which is basically just a generic object that represents the
object firing the event.


Try doing this:
protected void DoItemUpdated(object sender, DetailsViewUpdatedEventArgs
Args)
{

}

hope this helps,
Mark Fitzpatrick
Microsoft MVP- Expression

"Gary Wardell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> HI,
>
> I'm getting this error:
>
> No overload for 'DoItemUpdated' matches delegate
> 'System.Web.UI.WebControls.DetailsViewUpdatedEvent Handler'
>
> on line=22
>
> Line 22 reads:
>
> <aspetailsView ID="DetailsView1" runat="server" AutoGenerateRows="false"
> style="top: 25px; left: 15px; position: absolute; width: 622px"
> DataSourceID="SqlDataSource3"
> AutoGenerateEditButton="true"
> AutoGenerateDeleteButton="true"
> AutoGenerateInsertButton="true"
> OnItemUpdated="DoItemUpdated"
>>

>
> The function in the code behind reads:
>
> protected virtual void DoItemUpdated(DetailsViewUpdatedEventArgs Args)
> {
> lblMsg.Text = " Record " + Args.Keys["BookID"] + " updated";
> }
>
> Since I am a bit new to ASP.net and C# I'm at a loss as to what it's
> trying
> to tell me?
>
> Is it saying it can't find the function?
>
> Is it saying that the definition of the function doesn't match what is
> expected?
>
> I've tried different definitions, the message doesn't change.
>
> It can find the Page_Load function in the same file which has a similar
> definition.
>
> Gary
>
>
>
>

 
Reply With Quote
 
 
 
 
Gary Wardell
Guest
Posts: n/a
 
      06-12-2008
Hi,

That did it.


 
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
function overload (not operator overload) Ying-Chieh Liao Perl Misc 3 10-11-2004 11:24 AM
UDP ports using PAT (NAT overload) - Help! Greg Grimes Cisco 8 10-08-2004 05:49 PM
UDP source ports using PAT (NAT overload) Greg Grimes Cisco 3 08-16-2004 10:26 PM
Using multiple outside interface with ip nat overload Emanuel Cisco 1 02-25-2004 08:10 AM
How use the overload of>> (or<<) of a class in the overload of << and >> of another class? Piotre Ugrumov C++ 3 01-25-2004 08:08 PM



Advertisments