Protection levels after Conversion Wizard

G

Guest

Hi

I've got a project I've just run through the conversion wizard, and it's
giving me a few headaches.

I've got a user control which has controls referrenced from its calling page
(usercontrol1.textbox1.text etc).

All worked fine in V2003, but 2005 is giving me a "usercontro1.textbox1 is
inaccessible due to it's protection level" error. Obviously, with it now
being a partial class, I can't look at or edit the public/private declaration.

How do I fix this in 2k5!?

Cheers



Dan
 
S

Steven Cheng[MSFT]

Hi Dan,

Welcome to MSDN newsgroup.
As for the control member variable's access level between asp.net 1.1 and
2.0 pages /usercontrols, that's a known change since the asp.net 2.0 page
now use dynamic compilation and partial class which no longer require us to
explicitly declare the control vairables in page class..... And for our
old 1.1 page or Usercontrol, if we use public member variable to expose
control instances, we'd recommend change them by defining some public
properties that wrapper those control members. Also, here is a tech article
covers the most changes when upgrading asp.net 1.x project to asp.net 2.0
application also the best practice of how to modify them:

#Common Web Project Conversion Issues and Solutions
http://msdn.microsoft.com/asp.net/reference/migration/upgrade/default.aspx?p
ull=/library/en-us/dnaspp/html/conversionissuesasp_net.asp


Also, the dev team have just published a update on the VS IDE's web project
upgrade wizard:

#Microsoft Visual Studio 2005 - Update to the Web Project Conversion Wizard
http://www.microsoft.com/downloads/details.aspx?FamilyId=7CECD652-FC04-4EF8-
A28A-25C5006677D8&displaylang=en

So please feel free to post your feedback or requests to our MSDN feedback
center:

http://lab.msdn.microsoft.com/productfeedback/default.aspx

we'll be more than happy to recieve more and more feedback from our users,
and the dev guys can also try improving them from those requests and
comments.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





--------------------
| Thread-Topic: Protection levels after Conversion Wizard
| thread-index: AcYUWJule66h5cjcRO+NSqf75QAh7Q==
| X-WBNR-Posting-Host: 172.203.227.195
| From: "=?Utf-8?B?bXVzb3NkZXY=?=" <[email protected]>
| Subject: Protection levels after Conversion Wizard
| Date: Sun, 8 Jan 2006 05:37:02 -0800
| Lines: 19
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369302
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi
|
| I've got a project I've just run through the conversion wizard, and it's
| giving me a few headaches.
|
| I've got a user control which has controls referrenced from its calling
page
| (usercontrol1.textbox1.text etc).
|
| All worked fine in V2003, but 2005 is giving me a "usercontro1.textbox1
is
| inaccessible due to it's protection level" error. Obviously, with it now
| being a partial class, I can't look at or edit the public/private
declaration.
|
| How do I fix this in 2k5!?
|
| Cheers
|
|
|
| Dan
|
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top