Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Compiler Error Message: CS1061:

Source Error:

Line 34:
Line 35: TotalMarks:<asp:Label ID="lbltotal" align="right" runat="server">
Line 36: <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
Line 37:
Line 38: </form>

i got error in this line. in gridview button
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />

thank for your valuable replay
Posted
Comments
hitech_s 9-Nov-11 0:37am    
can u post the error

This error occurs when you try to call a method or access a class member that does not exist.

See this
http://msdn.microsoft.com/en-us/library/bb383961.aspx[^]

do you have button click event in .cs file
 
Share this answer
 
v2
Refer this:

http://forums.asp.net/p/1384530/3604935.aspx[^]

Once check you have button click event or not

Or else remove your button and create again
 
Share this answer
 
v2
Remove the button "Button1", then add a new one to the page.

If you want to add the click event, please double click the button on the design panel, then the onclick event will appear in the .cs file.

The error happen may be because Button1_Click event not exist in .CS page
 
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