0

I am getting this error, and cant figure out what the issue is.

    Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser 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: 'JobManager.Contact' is not allowed here because it does not extend class 'System.Web.UI.Page'.

Source Error: 


Line 1:  <%@ Page Title="Contact" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
Line 2:      CodeBehind="Contact.aspx.cs" Inherits="JobManager.Contact" %>
Line 3:  


Source File: /Contact.aspx    Line: 1 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1    

The code behind syntax is:

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

namespace JobManager
{
    public partial class Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
2
  • Could you show the declaration of the class JobSearchManager.Contact from the codebehind file? Commented Sep 19, 2010 at 18:47
  • That is not your code behind. That's a content page. Show us your code behind. Commented Sep 19, 2010 at 19:41

3 Answers 3

1

I suggest you delete and add your form again, if you didn't made modifications too much.

I think this problem is caused by partial class. Let me explain. You can see your class is defined as partial class.

public partial class Contact : System.Web.UI.Page

So there can be another part of Contract class and that part can be corrupted or derived from another class. You can check this.

Sign up to request clarification or add additional context in comments.

Comments

0

Well the error seems to tell you, that your class JobManager.Contact is not inherited from System.Web.UI.Page class or one of its descendants.

So does it?

If it does, then you're going to have to provide some of your code as well, namely your page class definition for instance. We'll start from there.

Comments

0
  • Check if you have a namespace conflict with another assembly.
  • Also delete your bin directory and rebuild your project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.