G
Guest
Hello,
I am trying to use APP_CODE folder for all my class files under VS 2005.
After adding APP_CODE in the solution explorer, I added a new web page by
right clicking project and selecting add new item. I expected the code
behind file (Default.aspx.cs) to automatically go under APP_CODE folder, but
it didnt. I tried to drag and drop the code behind file into the APP_CODE
folder. I also changed the page directive to the following:
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="~/App_Code/Default.aspx.cs" Inherits="Default" %>
I also tried the follwing page directive
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
The problem that I am facing is the error that I get when I build the
solution. Following is the error
Error 1 The file '/Todelete/App_Code/Default.aspx.cs' is in the special
directory 'App_Code', which is not allowed.
I have searched for this error in the internet but didn't get a solution.
Can anybody please help me here. How can I make the code behind file to
reside inside my APP_CODE folder.
thanks
pradeep
I am trying to use APP_CODE folder for all my class files under VS 2005.
After adding APP_CODE in the solution explorer, I added a new web page by
right clicking project and selecting add new item. I expected the code
behind file (Default.aspx.cs) to automatically go under APP_CODE folder, but
it didnt. I tried to drag and drop the code behind file into the APP_CODE
folder. I also changed the page directive to the following:
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="~/App_Code/Default.aspx.cs" Inherits="Default" %>
I also tried the follwing page directive
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
The problem that I am facing is the error that I get when I build the
solution. Following is the error
Error 1 The file '/Todelete/App_Code/Default.aspx.cs' is in the special
directory 'App_Code', which is not allowed.
I have searched for this error in the internet but didn't get a solution.
Can anybody please help me here. How can I make the code behind file to
reside inside my APP_CODE folder.
thanks
pradeep