First time use VS .Net 2005, questions

H

Hardy Wang

Hi all,
I just installed VS.Net 2005 and tried to play with it. I have following
questions
1) I created a web project, I compile it, unlike VS.Net 2003 but I could not
find any DLL files in BIN folder, where are they?
2) I published the site, then I found a file named App_Web_xozrid3w.dll in
folder where I published. It seems that this should be the compiled web
project. BUT I could not find a setting how to control the naming of the
DLL.
3) In VS.Net 2003, the page behind code has something like
#region Web Form Designer generated code
override protected void OnInit(EventArgs e) {
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.Load += new System.EventHandler(this.Page_Load);
this.btnSubmit.ServerClick += new EventHandler(btnSubmit_ServerClick);
this.valDate.ServerValidate += new
ServerValidateEventHandler(valDate_ServerValidate);
}
#endregion
But it is no longer available in this version. How can I turn them on by
default? And AutoEventWireup="true" is default in ASPX page now.
4) I added a Global.Asax, the code behind is totally disabled, which I hate
a lot.
5) Anybody has some recommendation of some books regarding VS 2005 and
ASP.NET 2.0?

Thanks a lot!
 
C

Cowboy \(Gregory A. Beamer\)

The ASP.NET 2.0 model is built on a completely different compile model, at
least by default. If you desire a known named DLL, you can compile a site
for deployment and have complete control over everything. In fact, there is
an option to compile all of your tagged pages into the DLL and deploy no
pages at all ... only a compiled DLL.

For the most part, ASP.NET 2.0 pushes towards a true dynamic compile model,
which focuses on a single page per DLL. If you want a more 1.x experience,
you have to compile for deploy. I have not done this in the latest builds,
so I am not sure how to do this from the IDE (was command line in earlier
betas).

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

***********************************************
Think Outside the Box!
***********************************************
 
B

Bruce Barker

see inline

-- bruce (sqlwork.com)

Hardy Wang said:
Hi all,
I just installed VS.Net 2005 and tried to play with it. I have
following questions
1) I created a web project, I compile it, unlike VS.Net 2003 but I could
not find any DLL files in BIN folder, where are they?

it depend on if you are file based or web based project. file based projects
go to a temp area and the VS webserver run them from there.

a web based project will build them in the bin

2) I published the site, then I found a file named App_Web_xozrid3w.dll in
folder where I published. It seems that this should be the compiled web
project. BUT I could not find a setting how to control the naming of the
DLL.

with 2.0 every page produces a dll, and one is created for the the code in
app_code directory. unique names are used, so that if you change a page
source, it can be recompiled while the site is running, becuase the dll has
a diffent name.

generally you don't control the name.
3) In VS.Net 2003, the page behind code has something like
#region Web Form Designer generated code
override protected void OnInit(EventArgs e) {
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.Load += new System.EventHandler(this.Page_Load);
this.btnSubmit.ServerClick += new EventHandler(btnSubmit_ServerClick);
this.valDate.ServerValidate += new
ServerValidateEventHandler(valDate_ServerValidate);
}
#endregion
But it is no longer available in this version. How can I turn them on by
default? And AutoEventWireup="true" is default in ASPX page now.

the codebehind is now a partial class (think of it being included with the
code generated from the aspx page). so now the aspx page code defines all
the event linkups and variable definations. so this is no longer needed.

note: autowireup='true" causes the event handler linkups. if you turn this
off, you will need to manually hookup events (like vs2003 needed to do).
4) I added a Global.Asax, the code behind is totally disabled, which I
hate a lot.

things change. not sure what you dislike (why have two files), it edits the
same.
5) Anybody has some recommendation of some books regarding VS 2005 and
ASP.NET 2.0?

the included docs look good to me.
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top