473,406 Members | 2,404 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,406 software developers and data experts.

ASP.NET: VSNET2003 to VSNET2005

I just upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005.
There are several questions I have about the code differences between them
(I use VB.NET for as my language of choice):

1. 2003 used "Public Class classname" and 2005 uses "Partial Class
classname". What, if any, difference is there between these?

2. The following things are included in the #Region " Web Form Designer
Generated Code " part of 2003's code, and are not included automatically in
2005:

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Control declarations, such as:
Protected WithEvents lblWebsite As System.Web.UI.WebControls.Label
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub

Do I need to include any of these manually or anything else that serves
their purpose?

3. In 2003 the Page Events use clauses such as Handles MyBase.Load while
2005 uses Handles Me.Load. I am assuming that these will work the same?
I am sure that I will run into the other differences between the two, but
these are some of the important ones for me right now. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jun 30 '06 #1
4 1031
the main difference from 2003 to 2005, is how a page is compiled.

in 2003 when asp.net compiled an aspx, it had the page inherit from the code
behind file, which VS had compiled into a separate dll. this required the
funky double declare of controls, and linking up the events. note there are
two compiles, the codebehind into a dll by vs, and each aspx page as a
separate dll by the asp.net compiler.

in 2005 there is a new feature called partial classes. this allows a class
to be broken into two files and compiled together. VS no longer compiles the
code behind files into their own dll. the asp.net compiler does all the
work, so the codebehind is in the same dll as the aspx page. because the
codebehind and the aspx page code is merged thru the magic of partial
classes, then a control is defined in aspx, the codebehind knows about it.

-- bruce (sqlwork.com)

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
I just upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005.
There are several questions I have about the code differences between them
(I use VB.NET for as my language of choice):

1. 2003 used "Public Class classname" and 2005 uses "Partial Class
classname". What, if any, difference is there between these?

2. The following things are included in the #Region " Web Form Designer
Generated Code " part of 2003's code, and are not included automatically
in 2005:

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Control declarations, such as:
Protected WithEvents lblWebsite As System.Web.UI.WebControls.Label
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub

Do I need to include any of these manually or anything else that serves
their purpose?

3. In 2003 the Page Events use clauses such as Handles MyBase.Load while
2005 uses Handles Me.Load. I am assuming that these will work the same?
I am sure that I will run into the other differences between the two, but
these are some of the important ones for me right now. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jun 30 '06 #2
1) A partial class just means that the class is split across one or more
files. "Partial" has no effect on whether a class is public or private.

2) No

3) Yes

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
I just upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005.
There are several questions I have about the code differences between them
(I use VB.NET for as my language of choice):

1. 2003 used "Public Class classname" and 2005 uses "Partial Class
classname". What, if any, difference is there between these?

2. The following things are included in the #Region " Web Form Designer
Generated Code " part of 2003's code, and are not included automatically
in 2005:

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Control declarations, such as:
Protected WithEvents lblWebsite As System.Web.UI.WebControls.Label
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub

Do I need to include any of these manually or anything else that serves
their purpose?

3. In 2003 the Page Events use clauses such as Handles MyBase.Load while
2005 uses Handles Me.Load. I am assuming that these will work the same?
I am sure that I will run into the other differences between the two, but
these are some of the important ones for me right now. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jun 30 '06 #3
Nathan,

If you are converting than you can decide to do it this way,
Be aware that this adds a fourth method how you can use ASPX in version 2005

http://msdn.microsoft.com/asp.net/re...p/default.aspx

I hope this helps,

Cor

"Nathan Sokalski" <nj********@hotmail.com> schreef in bericht
news:el**************@TK2MSFTNGP02.phx.gbl...
I just upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005.
There are several questions I have about the code differences between them
(I use VB.NET for as my language of choice):

1. 2003 used "Public Class classname" and 2005 uses "Partial Class
classname". What, if any, difference is there between these?

2. The following things are included in the #Region " Web Form Designer
Generated Code " part of 2003's code, and are not included automatically
in 2005:

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Control declarations, such as:
Protected WithEvents lblWebsite As System.Web.UI.WebControls.Label
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub

Do I need to include any of these manually or anything else that serves
their purpose?

3. In 2003 the Page Events use clauses such as Handles MyBase.Load while
2005 uses Handles Me.Load. I am assuming that these will work the same?
I am sure that I will run into the other differences between the two, but
these are some of the important ones for me right now. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jun 30 '06 #4
bruce barker (sqlwork.com) wrote:
VS no longer compiles the code behind files into their own dll.
The asp.net compiler does all the work, so the codebehind is in
the same dll as the aspx page.


Can you recommend a good [web-based?] reference on the changes in
ASP.Net development between VS 2003 and VS 2005?

In particular, I'm interested in which files get generated/compiled when
and where do they get put?

TIA,
Phill W.
Jun 30 '06 #5

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

Similar topics

3
by: lawrence | last post by:
I haven't been able to reach www.php.net for days. Most of the rest of the web is working for me, though I've bad trouble reaching any English sites. Anyone else having trouble?
0
by: Steve | last post by:
Hello, I am using VSNET2003, in my solution there are some C# project and one non_managed C++ project. Suddently all my parameters in all my C# project are reset to nothing in Visual Studio; So I...
0
by: Georgeo Pulikkathara[MS] | last post by:
ASP.NET Webcast Week - January 19 - 23, 2004 Learn about ASP.NET from the experts! These free webcasts are live and interactive. Live code demos and attendees asking in depth engaging questions are...
1
by: Novice | last post by:
Hi all, I am a C++ and Java developer with over 3 years of industry experience. I've written low level C++ code, in addition to web clients that use web services. I've just recently installed the...
1
by: Joel | last post by:
As my registry start condition was working fine, now it's not working anymore Here are the kind of parameter I use in VSNEt2003: A) Registry : Name : Pipo; Property : PROP1; RegKey...
9
by: gulu man | last post by:
Hi, What is the substitute for COM objects in .NET? How can I create something similar to com in .net? Is it still possible? Thank you
0
by: Kevin Ortman | last post by:
We recently ported our code from VSNET2002 to 2003 After migration, we noticed that several properties of one of our classes no longer pop up in intellisense ( the get_ set_ methods pop up, but...
8
by: Shane Story | last post by:
I would like to embed mutiple icons inside my main exe file so that they can be viewed like Shell32.dll or whatever. Can't figure out how to do this. Sorry if this is in the wrong group. ...
3
by: Nathan Sokalski | last post by:
I just upgraded from Visual Studio .NET 2003 to Visual Studio .NET 2005. There are several questions I have about the code differences between them (I use VB.NET for as my language of choice): ...
2
by: Rastko Soskic | last post by:
Hi, everyone. In previous version of ASP.NET, entire site (web project) was compiled (built) into single assembly, so I could import reference of the site's dll into (separate) project which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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
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...

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.