Solved

C# parser error - finding previous project copied from

Posted on 2007-03-23
5
325 Views
Last Modified: 2012-05-05
I'm getting a parser error message that refers back to a project that this project was copied from.  This name "PSMPortal" does not exist anywhere in this project.   clsHeadTable1 is defined everywhere in the project exactly the same but does not get this error:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'ButtonBar1', but its type (PSMPortal.ButtonBar) is not compatible with the type of control (ASP.ButtonBar_ascx).

Source Error:


Line 25:                   <CHN:clsheadtable id="ClsHeadTable1" runat="server"></CHN:clsheadtable>
Line 26:                   <p style="MARGIN-TOP:-15px">
Line 27:                         <CHN:ButtonBar id="ButtonBar1" runat="server"></CHN:ButtonBar></p>

 
0
Comment
Question by:dcass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Neotk
ID: 18781190
PSMPortal is the namespace where the button is in.

You can change your buttonbar namespace and add a reference in your project.

Look in web.config, maybe there will be the reference to PSMPortal, there you should change its name to your new setted namespace.

Regards
Rodrigo Matias Leote
0
 

Author Comment

by:dcass
ID: 18784101
There are no references to PSMPortal in the project at all.  When I put CHN.ButtonBar, I get an error that says that I can't reference outside this project.  The project and then namespace is CHN.
Here is the code:
<%@ Register TagPrefix="CHN" TagName="ButtonBar" Src="../ButtonBar.ascx" %>
<%@ Register TagPrefix="CHN" TagName="clsHeadTable" Src="../clsHeadTable.ascx" %>
<%@ Page language="c#" Codebehind="CycleAdd.aspx.cs" AutoEventWireup="false" Inherits="CalendarApp.CycleAdd" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
      <HEAD>
            <title>Block</title>
            <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
            <meta content="C#" name="CODE_LANGUAGE">
            <meta content="JavaScript" name="vs_defaultClientScript">
            <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      </HEAD>
      <body>
            <form id="Block" method="post" runat="server">
                  <CHN:clsheadtable id="ClsHeadTable1" runat="server"></CHN:clsheadtable>
                  <p style="MARGIN-TOP:-15px">
                        <CHN:ButtonBar id="ButtonBar1" runat="server"></CHN:ButtonBar></p>
                  

and then the aspx (not the whole thing but what I think is relevant):
namespace CalendarApp
{
      public class CycleAdd : System.Web.UI.Page
      {
            protected System.Web.UI.WebControls.Button Button1;
            protected System.Web.UI.WebControls.Button Button2;
            protected ButtonBar ButtonBar1;
            private void Page_Load(object sender, System.EventArgs e)
            {
// load data table
                                  }
                }
}


#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
      InitializeComponent();
      base.OnInit(e);
      if (!IsPostBack)
      {                        
          InitializeUISelectors();
          ButtonBar1.ShowAddButton = false;
          ButtonBar1.ShowDeleteButton = false;
          ButtonBar1.ShowPrintButton = false;
          ButtonBar1.ShowUpdateButton = false;                     ButtonBar1.BarButtonClicked +=new AnyButtonClicked(ButtonBar1_BarButtonClicked);
                   }
}
private void InitializeComponent()
{    
      this.Button1.Click += new System.EventHandler(this.Button1_Click);
      this.Button2.Click += new System.EventHandler(this.Button2_Click);
      this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
    AddModeledCall();
    Response.Redirect("CycleAdd.aspx");
}
private void Button2_Click(object sender, System.EventArgs e)
{
    Response.Redirect("ManageCycles.aspx");
}
private void AddModeledCall()
{
// stuff that works in previous project copied from
}


Please help!  
0
 

Accepted Solution

by:
dcass earned 0 total points
ID: 18787218
I solved it - I recreated the project under a different name and copied everything back in and the problem went away - since this has happened to me before, I assume it's a .NET bug - I'm using the older version, but I'm getting it into the new one asap.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question