Protection levels after Conversion Wizard

Discussion in 'ASP .Net' started by =?Utf-8?B?bXVzb3NkZXY=?=, Jan 8, 2006.

  1. 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
     
    =?Utf-8?B?bXVzb3NkZXY=?=, Jan 8, 2006
    #1
    1. Advertising

  2. 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=?=" <>
    | Subject: Protection levels after Conversion Wizard
    | Date: Sun, 8 Jan 2006 05:37:02 -0800
    | Lines: 19
    | Message-ID: <>
    | 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
    |
     
    Steven Cheng[MSFT], Jan 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    0
    Views:
    487
    VB Programmer
    Aug 24, 2005
  2. g
    Replies:
    69
    Views:
    2,220
    Oliver Wong
    Apr 25, 2006
  3. Kay Schluehr

    Protection levels in Python

    Kay Schluehr, Jul 27, 2006, in forum: Python
    Replies:
    0
    Views:
    300
    Kay Schluehr
    Jul 27, 2006
  4. Replies:
    0
    Views:
    625
  5. Andy B
    Replies:
    0
    Views:
    455
    Andy B
    Apr 19, 2008
Loading...

Share This Page