RE: ASP.Net 2.0 - App_Code Folder
- From: wawang@xxxxxxxxxxxxxxxxxxxx (Walter Wang [MSFT])
- Date: Fri, 19 Jan 2007 06:49:18 GMT
Hi netasp,
You can find more information about common ASP.NET 2.0 conversion issues
and solutions here:
#Common ASP.NET 2.0 Conversion Issues and Solutions
http://msdn2.microsoft.com/en-us/library/ms972973.aspx
From the document, you will see following changes are related to your issue:
--------------------
In ASP.NET 1.x, the graphical components were typically separated from the
coding components using an .aspx page and a code-behind file. The .aspx
page is derived from the code-behind file. This means that you have to
declare all your controls in both classes in order to properly wire up the
callback events. The inheritance relationship also caused some problems
with synchronizing the classes, especially when a developer made a change
to the .aspx (such as adding a control), without making the necessary
changes to the code-behind or recompiling the application.
In ASP.NET 2.0, the code separation model has changed, thanks to the advent
of a concept known as the partial class. The partial keyword lets you split
the code for a single class into two separate files. The code-behind file
defines a partial class that contains user code. The designer will also
generate a stub file containing a partial class that defines the field
declarations for the controls used in the aspx page. When compiled, the
aspx page will derive from the combined partial classes, and be compiled
into its own page assembly. This design reduces the risk of inadvertently
breaking the page by editing designer-generated code.
The conversion wizard updates your application by moving all standalone
code to the App_Code directory.
--------------------
I think maybe some of your code are standalone and therefore they're
migrated to App_Code. However, based on my test, if the code file is a
CodeBehind class for a WebForm, it will not be migrated to App_Code.
Would you please create a simpler reproducible VS2003 web project and send
it to me? I can verify the migration behavior on my side. Thanks.
Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- ASP.Net 2.0 - App_Code Folder
- From: netasp
- ASP.Net 2.0 - App_Code Folder
- Prev by Date: Re: How to reference a recourse file from a class in WPF
- Next by Date: Re: INotifyPropertyChanged Bug ?
- Previous by thread: ASP.Net 2.0 - App_Code Folder
- Next by thread: What is ManagedMD.ILMethodException?
- Index(es):
Relevant Pages
|