Wednesday, August 3, 2011

CS0123: No overload for 'smsbtn_Click' matches delegate 'System.EventHandler'

There was a ImageButton in my aspx page.

protected void smsbtn_Click(object sender, ImageClickEventArgs e)
{
}

I changed the code. I used LinkButton instead of ImageButton.
protected void smsbtn_Click(object sender, ImageClickEventArgs e)
{
}

But i fogot to change the ImageClickEventArgs to EventArgs. That was the reason for getting this error. :)

No comments:

Post a Comment

How to Create Events Using Microsoft Graph API with Delegated Permissions and MSAL.js

Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...