This is a migrated thread and some comments may be shown as answers.

Coding Problem..Please Help

5 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rebel123
Top achievements
Rank 1
Rebel123 asked on 06 Jan 2010, 03:01 PM
Hi,

I am getting the following error when i try to insert a button onto my webpage to allow users to submit there personal details which are then sent to a DB...

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: CS1061: 'ASP.regpage_aspx' does not contain a definition for 'Button1_Click' and no extension method 'Button1_Click' accepting a first argument of type 'ASP.regpage_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:

 

Line 383:      

Line 384:</table>

Line 385:<asp:Button ID="Button1" runat="server" onclick="Button1_Click"

Line 386:            Text="Submit Now!" Width="200px" Font-Bold="True"

Line 387:             Font-Names="Comic Sans MS" />



Does anyone know how i can fix this problem??
Its seems to be happening on everypage that i want to put a button on.

Thanks

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Jan 2010, 01:28 PM
Hello,

The only thing which I can assume without examining a reproduction demo is that in the code-behind you have some incorrect or missing references. Therefore, I suggest you examine the code-behind and especially the button-related code and try to find the issue there.

Additionally, if the issue still persist, please open a new support ticket and send us a sample, fully runnable application. Thus we could be able to help you further in resolving it.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rebel123
Top achievements
Rank 1
answered on 07 Jan 2010, 03:37 PM
Thank you for getting back to me so soon. I managed to fix the problem.
However, i have another question. When i put the button on the page(drag and drop) it goes onto the page but when i double click on the button to code behind the button it will not let me get to the aspx.cs page. If i right click and select view code it takes me to the aspx.cs page however it does not show that there is a button on my aspx page, even though it can be seen there.

Do you know what is causing this to happen??
0
Pavlina
Telerik team
answered on 07 Jan 2010, 04:29 PM
Hello,

I am afraid that this task is not related to RadControls, but is a general one.
However, do not hesitate to contact us if you have any questions or problems related to our controls.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 11 Jan 2010, 02:45 AM
Paste in the code from the .cs and the .aspx...

Might be that the class the aspx is trying to find doesnt have the same name?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> 

So it's looking for the .cs file to have a class name of Default in Default.aspx.cs
public partial class Default : System.Web.UI.Page  
 
 





0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 11 Jan 2010, 02:46 AM
I've seen a couple Generic Coding questions posted here, I wonder if people are getting confused by the product name and the forum purpose (like this forum is for "Just Code")...
Tags
General Discussions
Asked by
Rebel123
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Rebel123
Top achievements
Rank 1
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or