Code-separation in ASP.NET 2.0

M

Michael

Hi,

I'm using Visual Studio 2005 RTM.
After reading some articles about ASP.NET beta1 & beta2,
I'm confused...

Q1: Is the default coding mode Inline code?

Q2: How many .DLLs will be generated for one page?
it saids that .aspx will be compiled into a DLL, and the
separated .cs/.vb file will be another.

Q3: What is the effect of "Inherit" attribute in @Page directive?
Does it mean the .aspx page inherit from the separated class?
I though the two files are compiled into one class through
partial class mechanism, am I right?

Thank you!
 
D

Daniel Fisher\(lennybacon\)

Q1: Is the default coding mode Inline code?

If you create a new web app the default web form has "Code Behind"
Q2: How many .DLLs will be generated for one page?
it saids that .aspx will be compiled into a DLL, and the
separated .cs/.vb file will be another.

Either oner dll per page or app but definatly aspx and codebehind in one
dll.
Q3: What is the effect of "Inherit" attribute in @Page directive?
Does it mean the .aspx page inherit from the separated class?
I though the two files are compiled into one class through
partial class mechanism, am I right?

A page with copde behind will be compiled in TWO CLASSES.
 
M

Michael

Q1: Is the default coding mode Inline code?
If you create a new web app the default web form has "Code Behind"

Thank you! Daniel.
There're Code-behind, Code-beside, and Code-separation mode,
I wonder which is the "official" term?

Michael
 
J

Juan T. Llibre

re:
Q1: Is the default coding mode Inline code?

You can choose either.

When you create a new file, choose whether it will be codebehind or inlne.
The VS IDE will remember your choice, although you can change it anytime.

re:
Q2: How many .DLLs will be generated for one page?

That will depend on the code model and the publishing model you select.

There's a new tool which allows 2.0 developers
to publish the site dll's in various modes.

Check it out at :
http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top