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

N

needin4mation

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.
 
C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 
B

bruce barker \(sqlwork.com\)

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)
 
N

needin4mation

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top