Groups > Asp .Net > Visual Studio 2005 > Re: CodeFile necessary for Web Application?




CodeFile necessary for Web Application?

CodeFile necessary for Web Application?
Wed, 2 Apr 2008 16:50:18 +0000
Hi,

I have created a web application, and I am working on publishing it.  When go to
the browser and load the application on the server, it errors out.  It says that
it can't find the CodeFile for the specified file.  I can get it to work if I
delete the CodeFile from my Page tag, but I don't know if I should do this or
not.  I don't want this to have an adverse effect in other areas of the
application.


Before (Doesn't Work):

<%@ Page Language="C#" AutoEventWireup="true"
MasterPageFile="masterPages/MasterPage.master"
CodeFile="Default.aspx.cs"
Inherits="Company.PCMS.Website.Home" Title="PCMS"
Theme="Generic" %>

After (Works):

<%@ Page Language="C#" AutoEventWireup="true"
MasterPageFile="masterPages/MasterPage.master"
 Inherits="Company.PCMS.Website.Home" Title="PCMS"
Theme="Generic" %> 

 

Thank you, 

Ryan
Post Reply
Re: CodeFile necessary for Web Application?
Wed, 2 Apr 2008 17:23:22 +0000
If your not using the code behind file then you don't need it.
Post Reply
Re: CodeFile necessary for Web Application?
Wed, 2 Apr 2008 17:28:29 +0000
All of the c# files are compiled into one dll. So, when I publish the web
application the methods and classes are accessed through inheritance.  This is
my understanding anyways.
Post Reply
Re: CodeFile necessary for Web Application?
Wed, 2 Apr 2008 18:13:35 +0000
Hi

I believe my suspicion was correct.  I don't need the CodeBehind or CodeFile
references in the page tags.  All the classes and namespaces are compiled into
one file that all of the aspx files can access.  Thus, they don't need to
reference CS files.


-Ryan
Post Reply
about | contact