473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to compile the code behind .cs files

I started recently with asp.net 2.0 and I am currently trying to generate the
mysite.dll by compiling the corresponding code behind .cs files. I am using
the csc tool that displays one CS0103 error message (The name '...' does not
exist in current context) for every control id that I am using in the .ascx
files ('...' is the id of the control).

From one point of view this is logical since there are no anymore
declarations for the page controls in the code behind file. However I am
wandering: "How can someone generate the mysite.dll using the command line
compiler in asp.net 2.0?"

Thanks in advance
Jun 19 '06 #1
2 2168
the codebehind file in 2.0 are partial classes, and can not be compiled
stand alone with the c# compiler. you should use the aspnet compiler
(aspnet_compiler.exe).

-- bruce (sqlwork.com)
"Argirop" <Ar*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
I started recently with asp.net 2.0 and I am currently trying to generate
the
mysite.dll by compiling the corresponding code behind .cs files. I am
using
the csc tool that displays one CS0103 error message (The name '...' does
not
exist in current context) for every control id that I am using in the
.ascx
files ('...' is the id of the control).

From one point of view this is logical since there are no anymore
declarations for the page controls in the code behind file. However I am
wandering: "How can someone generate the mysite.dll using the command line
compiler in asp.net 2.0?"

Thanks in advance

Jun 19 '06 #2
Then an other question is crossing my mind: Assuming that I am copying a
mypage.aspx and the corresponding mypage.ascx.cs code behind files in the
virtual directory of my application. The asp.net work process will compile
the .cs (and its corresponding complement in .ascx file) automatically before
running the page? If yes, into what assemply is placed the new page class ?

"bruce barker (sqlwork.com)" wrote:
the codebehind file in 2.0 are partial classes, and can not be compiled
stand alone with the c# compiler. you should use the aspnet compiler
(aspnet_compiler.exe).

-- bruce (sqlwork.com)
"Argirop" <Ar*****@discussions.microsoft.com> wrote in message
news:03**********************************@microsof t.com...
I started recently with asp.net 2.0 and I am currently trying to generate
the
mysite.dll by compiling the corresponding code behind .cs files. I am
using
the csc tool that displays one CS0103 error message (The name '...' does
not
exist in current context) for every control id that I am using in the
.ascx
files ('...' is the id of the control).

From one point of view this is logical since there are no anymore
declarations for the page controls in the code behind file. However I am
wandering: "How can someone generate the mysite.dll using the command line
compiler in asp.net 2.0?"

Thanks in advance


Jun 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ursula Peter-Czichi | last post by:
Found a different way to do it - onto the next problem... >-----Original Message----- >Software: WIN XP Professional, IIS 5.1, Visual Studio.Net >2002 - >I have figured out why my .aspx files...
4
by: Chris | last post by:
I work on a development server (Server A), and have a staging server (Server B), where updated ASP.Net files from Server A are sent to. I noticed that Server B will reflect changes made to .aspx...
2
by: sarojanand | last post by:
Hi, I have created a project (abc) in my wwwroot folder on my system. From visual studio, i am able to run and view this page. Now I have deployed on wwwroot folder and for this I have edited...
1
by: Steve Franks | last post by:
Hi, Does VS.NET Beta 2 provide allow you to define your own template to be used for new code behind pages? For example I have common code that needs to go into get code behinds Page_Load...
7
by: Alan Silver | last post by:
Hello, I am just looking at VWD and seeing what needs doing to take an existing site I've written by hand and importing it into VWD. I've already discovered that I need to rename my code-behind...
2
by: walter | last post by:
Hi, when I add a new page in my asp.net 2 project and put some controls there, everything works fine until I move the code behind into App_Code folder.--When I compile , it tells me that control...
8
by: Zeba | last post by:
Hi guys.. I just wanted to know whether its better to use the asp tags (or drag n drop) or write the actual code-behind for things like login, data accesses etc. I guess its easier to use the...
2
by: ahoyer | last post by:
Hey ive got a website that ive been working on for a while that has several pages each with their own code behind file written in c#. Right now im working on cleaning things up a little to make it...
5
by: DaveRook | last post by:
Hello I have a website which sells 200 products. Currently I use a results.aspx page to display and the querystring tells the databas which prodcut to show! However, not so good for Google...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.