asp .net 2.0 parser error

C

Carlos

Hi all,

A friend of mine just gave me his project from a 1.1 .net app, and
I converted it 'successfully' into a 2.0 app in my environment, then
rebuild it. I did not get any errors. However, when I try to view the
initial page in the browser I get a parser error:

Could not load type <appname.classname>

I did not see any errors in the rebuild step, and the class exists for the
page that I try to browse.

Can anybody give me a tip on what may be happening?

Thanks,

Carlos
 
K

Ken Cox - Microsoft MVP

Did you remember to change the syntax at the top of the .aspx files?

http://msdn2.microsoft.com/en-us/library/ms227671.aspx

"Web pages using the CodeBehind and Inherits attributes of the @ Page
directive will continue to work in the .NET Framework 2.0. However, you must
compile code-behind files and put the resulting assembly in the Bin folder.
"

Ken
Microsoft MVP [ASP.NET]
 
K

Ken Cox - Microsoft MVP

Oops wrong quote:

http://msdn2.microsoft.com/en-us/library/ms227671.aspx

"If you choose to migrate to the ASP.NET 2.0 code-behind model, you must
make coordinated changes to your .aspx file and code-behind file. In your
..aspx file, you will replace the CodeBehind attribute with the CodeFile
attribute. In your code-behind files, you will use a partial class. The
advantage of using the new code-behind model is that you do not have to
explicitly compile the code-behind files because the ASP.NET compiler will
do this automatically."
 
C

Carlos

Hi Ken,

thanks for the prompt reply. I think that I have both.
The amazing thing is that the wizard to convert the app from
1.1 to 2.0 already did all of that syntax change, and the re-buit process
worked fine. But still gives me that error..
 

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

Top