Visual Studio Page_Load error for InfoBlockControl

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi, I'm new to developing in Visual Studio,


I was trying to duplicate the InfoBlock.ascx file to make changes to the way the control behaves. When I copied the file I think I misclicked and removed Modules/InfoBlock.ascx from my solution. When I readded the file (right click Solution Explorer > add > existing item > Modules/InfoBlock.ascx), I got the following error on build:


Error  1  Type 'NopSolutions.NopCommerce.Web.Modules.InfoBlockControl' already defines a member called 'Page_Load' with the same parameter types  C:\nopCommerce\NopCommerceStore\Modules\InfoBlock.ascx.cs  35  24  NopCommerceStore


There are no copies of the file in the solution.


Any insights to this issue are immensely appreciated!


InfoBlock.ascx.cs:

using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NopSolutions.NopCommerce.BusinessLogic;
using NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings;
using NopSolutions.NopCommerce.Common.Utils;

namespace NopSolutions.NopCommerce.Web.Modules
{
    public partial class InfoBlockControl: BaseNopFrontendUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}


InfoBlock.ascx (line 1):

<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.InfoBlockControl"
    CodeBehind="InfoBlock.ascx.cs" %>
13 years ago
Solved. I went into the object browser and searched up InfoBlockControl under NopSolutions.NopCommerce.Web.Modules.InfoBlockControl. I really had another definition of the class unlike what I said before. Fail. I thought I deleted it, but I didn't.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.