Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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: CS1061: 'ASP.main_aspx' does not contain a definition for 'Button1_Click' and no extension method 'Button1_Click' accepting a first argument of type 'ASP.main_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:



Line 17: <p>
Line 18: &nbsp;&nbsp;&nbsp;&nbsp;
Line 19: <asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Line 20: style="height: 26px" Text="ok" />
Line 21: <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
Posted
Updated 27-Nov-13 5:18am
v2

I would delete the button and add it again. It may have gotten deleted from the designer some how.
 
Share this answer
 
That means the Button Click Event (Button1_Click) is not present at the Code Behind. Please add that.
 
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