ASP.NET 2.0 conversion problem - declared vars

C

Chris

I converted my project to 2.0 and now there are missing lines of code.

When I try to compile, I see that there are now variables that are not
declared.
Well, that was not the case before the conversion, but 2.0 deleted hundreds
of public variable declaration lines.

Has anyone else found this problem?

Thanks.
 
B

Bruce Barker

public (or protected) variables make no sense in asp.net page code (or its
codebehind). this is because every webform becomes its own dll, (unlike 1.1
where all the codebehind was in one assembly so pages could refer to each
other), nor is there any inheritance of page code. circular refs would occur
if the page assemblies refered to each other in 2.0

if your pages had public variables, referenced by other pages (say from a
transfer), you need to build a base page in the app_code directory, that the
page inherits from. the convert wizard should have done this for you.

all the codebehind control defs are removed, becuase only the defination in
the aspx page is required, same with event linkups.

-- bruce (sqlwork.com)
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top