Coding Problem..Please Help

6 posts, 0 answers
  1. Rebel123
    Rebel123 avatar
    2 posts
    Member since:
    Jan 2010

    Posted 06 Jan 2010 Link to this post

    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
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 07 Jan 2010 Link to this post

    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.
  3. DevCraft banner
  4. Rebel123
    Rebel123 avatar
    2 posts
    Member since:
    Jan 2010

    Posted 07 Jan 2010 Link to this post

    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??
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 07 Jan 2010 Link to this post

    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.
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 10 Jan 2010 Link to this post

    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  
     
     





  7. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 10 Jan 2010 Link to this post

    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")...
Back to Top
DevCraft banner