can't compile changes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 13 ans
Hi I'm using VB2010 and nopCommerce 1.6


I can't figure out  how to make changes to the .cs stick and build/re-build successfully.

for example - I add a new button(lets say to the root.Master.aspx) and create an 'OnClick" event on the code file (Root.Master.cs)
now I'm building/re-building the site (build -> Build website) and the build fails on trying to build the root.master page

the error massage says that  there isn't a definition for the event... so it has completely ignored the changes to the .cs file
I've triple checked everything and don't know what to do...

I can create events using <script> on the .aspx and it works without re-building but I really want to work with the .cs files to and do it properly

thanks
Il y a 13 ans
Nop 1.6 opens with  VS2008. Did you make a conversion in order to open in VS2010?
Is it VS2010 express you're using?
Il y a 13 ans
I don't think I made any conversions to open 1.6

I'm using VS2010 pro
Il y a 13 ans
Why dont you post the markup for your button and the code for your click method.
Il y a 13 ans
sure,
here it is:

I believe the .aspx markup is 'fine' because when I delete the 'OnClick' event the page builds fine with no error

.aspx:
<asp:button id="Button1" runat="server" text="test" OnClick="Button1_Click" />


.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;


namespace NopSolutions.NopCommerce.Web.MasterPages
{

      
    public partial class root : BaseNopMasterPage
    {
        
        protected override void OnLoad(object sender,EventArgs e)
        {
            
           base.OnLoad(e);    
          
        }

       //my addition to the code:
        protected void Button1_Click(object sender, EventArgs e)
        {
                  
                //do nothing
            
        }
      
      
    }
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.