Click here to Skip to main content
15,891,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a image at "/astCalc1/jpg/image.jpg" in my server. I use it in ae_downloads.aspx. I am getting on error:

VB
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'ImageButton1_Click' is not a member of 'ASP.ae_downloads_aspx'.

Line 15:     <asp:ImageButton ID="ImageButton1" runat="server" src="../astCalc1/jpg/image.jpg" OnClick="ImageButton1_Click" /></td><td>
Posted
Comments
Sergey Alexandrovich Kryukov 5-Feb-14 21:14pm    
You just don't have this method, missed or mixed up something. This question is not useful. You need to learn understanding of error messages, to start with, and understand what you are doing. Expecting that VS miraculously do what you want doesn't work.
—SA

This link may help you..

http://forums.asp.net/t/1333758.aspx[^]
 
Share this answer
 
Refer - '<name>' is not a member of '<classname>'[^].
Quote:
To correct this error
  1. Check the name of the member to ensure it is accurate.

  2. Use an actual member of the class.

Some points



  • Make sure the Event Exists on Code Behind.
  • Make sure the Event name is the same as declared in aspx that is ImageButton1_Click.
  • Make sure the Access Specifier of the Event is protected or public, not private.
    So, Event in Code Behind should look like.
    C#
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        // Do whatever you want to do.
    }


Explore more at ImageButton.Click Event[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900