How to load a type in parent-child website

Posted by salvationishere on Stack Overflow See other posts from Stack Overflow or by salvationishere
Published on 2010-05-22T02:48:58Z Indexed on 2010/05/22 2:50 UTC
Read the original article Hit count: 220

I am developing a C# VS 2008 / SQL Server 2008 website. Although this same code compiles in the Project version, the website version does not compile. Many of their files are the same so I do not understand even where to look. The only compile error I get is:

Could not load type 'DataMatch'

in my DataMatch.aspx file. Is the problem in my web.config file? How do websites differ from projects in VS? All four of these files reside in same directory.

Default.aspx file:

<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="AddFileToSQL" Title="Untitled Page" %>

...

Default.aspx.cs file:

...

using System.Data.SqlClient; using System.Security.Principal;

namespace AddFileToSQL { public partial class AddFileToSQL : System.Web.UI.Page {

...

DataMatch.aspx file:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataMatch.aspx.cs" Inherits="DataMatch" %>

...

DataMatch.aspx.cs file:

...

using System.Web.UI.WebControls; using AddFileToSQL;

public partial class DataMatch : AddFileToSQL {

...

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about sql-server-2008