473,508 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does asp.net use the code behind or the .dll?

Hi, I was trying to update some 1.1 code with 2005. I ran into
problems, so I thought I'd just use notepad to make a minor change to
the .cs file. When I run the .aspx file (and refresh), nothing
happens. The changes aren't there. They are in the .aspx file, of
course, but not the .aspx.cs file.

In the bin file is theh .dll for the entire application. Does ASP.NET
use the DLL or the codebehind? How can edit this code in notepad and
have the changes work? Do I have to now have Visual Studio?

Thank you.

Sep 15 '06 #1
3 4509
In 1.1, ASP.NET generally uses the dll. So, you have to compile the dll in
1.1. The exception is using the src="" instead of codebehind="" in the
@directive, which compiles on the fly. By default, ASP.NEt 2.0 is compile on
the fly. unless you publish and deploy, you will use this model.

QUEstion 2
Edit in notepad and then command line compile or compile in VS.NET 2003.

Question 3:
No, you can set up a script to use the command line compiler. If you use VS
2005, you will have to migrate the project to 2.0.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
<ne***********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Hi, I was trying to update some 1.1 code with 2005. I ran into
problems, so I thought I'd just use notepad to make a minor change to
the .cs file. When I run the .aspx file (and refresh), nothing
happens. The changes aren't there. They are in the .aspx file, of
course, but not the .aspx.cs file.

In the bin file is theh .dll for the entire application. Does ASP.NET
use the DLL or the codebehind? How can edit this code in notepad and
have the changes work? Do I have to now have Visual Studio?

Thank you.

Sep 15 '06 #2
it depends. vs. configures the aspx page to use the dll for the codebehind.
if you were using notepad, you'd probably not use a dll, but let asp.net
compile the codebehind. asp.net will compile the codebehind if specified in
the CodeFile attribute (if i remember 1.1 correct).

to switch you will have to delete the dll and update all pages to ref the
code behind (or you'll get ambiguous class definitions). you will have
trouble if pages refer to each other, or you have common classes.

you can also use the command lie compiler to recompile the dll without vs.

-- bruce (sqlwork.com)
<ne***********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Hi, I was trying to update some 1.1 code with 2005. I ran into
problems, so I thought I'd just use notepad to make a minor change to
the .cs file. When I run the .aspx file (and refresh), nothing
happens. The changes aren't there. They are in the .aspx file, of
course, but not the .aspx.cs file.

In the bin file is theh .dll for the entire application. Does ASP.NET
use the DLL or the codebehind? How can edit this code in notepad and
have the changes work? Do I have to now have Visual Studio?

Thank you.

Sep 15 '06 #3
I have been trying to manually compile with csc my ten files and
resource files to no avail. It compiles, but the global just keeps
saying can't load type Global. I have all my .aspx.cs files there,
including the Global, just doesn't work on the server when I copy the
dll back to the server from the development machien. Maybe its because
I am 2.0 server at 1.1. I don't know.

I have also tried the .src versus codebehind. This works, but the
problem is that now the .cs class files that are separate from the
"regular" .aspx and .aspx.cs files is no longer reference. The
..aspx.cs files can't find my .cs class file and I don't know how to fix
that. Everything's in the same directory and I thought using myClass;
would do it, but it doesn't.
bruce barker (sqlwork.com) wrote:
it depends. vs. configures the aspx page to use the dll for the codebehind.
if you were using notepad, you'd probably not use a dll, but let asp.net
compile the codebehind. asp.net will compile the codebehind if specified in
the CodeFile attribute (if i remember 1.1 correct).

to switch you will have to delete the dll and update all pages to ref the
code behind (or you'll get ambiguous class definitions). you will have
trouble if pages refer to each other, or you have common classes.

you can also use the command lie compiler to recompile the dll without vs.

-- bruce (sqlwork.com)
<ne***********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Hi, I was trying to update some 1.1 code with 2005. I ran into
problems, so I thought I'd just use notepad to make a minor change to
the .cs file. When I run the .aspx file (and refresh), nothing
happens. The changes aren't there. They are in the .aspx file, of
course, but not the .aspx.cs file.

In the bin file is theh .dll for the entire application. Does ASP.NET
use the DLL or the codebehind? How can edit this code in notepad and
have the changes work? Do I have to now have Visual Studio?

Thank you.
Sep 15 '06 #4

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

Similar topics

6
1709
by: nospam | last post by:
I just read on Slash Dot about partial types. Now, is it possible to have a code behind split over two pages but still referencing the same .aspx file??? If so, that would be really nice as...
5
1475
by: Girish | last post by:
hey all, im building a asp.net project in vs.net. Is there a way to have the codebehind files sit in a different folder outside the website folder altogether? example: The aspx files are in...
8
5345
by: Brett Robichaud | last post by:
I understand how code-behind can handle events for a page, but can I call a code-behind method from within a <script> tag in my ASP.Net page, or can I only call methods defined in other <script>...
5
36828
by: Richard Dixson | last post by:
I created a new C# web application. Basically all I am trying to do is create a table that consists of a few rows with two columns in each. And then to set those columns to text values from my...
37
5917
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes...
171
7593
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
17
2674
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
19
3731
by: Alan Silver | last post by:
Hello, I have been developing ASP.NET with a text editor so far (better way to learn initially), and have now been trying Visual Web Developer. I want to create a project for an existing site...
2
4804
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.