Convert to Web Application

Discussion in 'ASP .Net' started by Rick, Aug 7, 2007.

  1. Rick

    Rick Guest

    I'm converting a large web application from VS2003 - VS2005. I right clicked
    on the web project and selected convert to web application. The conversion
    created a designer file for each .aspx file. Everywhere in the code behind
    that we are using me.[controlname]. I'm getting and error:
    '[Controlname]' is not a member 'Webproject.pagename'.

    What do I need to do to get around this without having to go to each page
    and add the reference to the control back into the page?

    Thanks in advance!
    Rick, Aug 7, 2007
    1. Advertisements

  2. Hi Rick,

    Based on my understanding, you're migrating a VS2003 web project to VS2005
    using the Web Application Project type.

    First, if you haven't read the guide on the convertion here, I recommend
    you to read it:

    #Migrating a VS 2003 Web Project to VS 2005

    From the guide, in step 8: Convert to Partial Classes:

    When you migrate your project using the above steps, none of your
    code-behind page code or classes are modified. This means that the code
    should look (and work) just like it did in VS 2003. This makes it much
    easier to migrate existing code to VS 2005.

    You can optionally choose to keep your code in this format. Doing so will
    require you to manually update the control field declarations within your
    code-behind file -- but everything else will work just fine in VS 2005.

    This means converting to the partial classes mode is optional, the migrated
    web application should be working fine without this.

    Please confirm if this is working correctly on your side if you don't run
    the action "Convert To Web Application".

    Further down the guide, it also mentioned that:

    If for some reason the .designer.cs file doesn't have a control declaration
    added, you can manually declare it within the code-behind file of the page
    (just like you would in VS 2003). One issue we've sometimes seen reported
    are cases where a developer has specifically overriden the type of a
    Usercontrol declaration in a VS 2003 code-behind file (for example:
    MyControl1 instead of the generic UserControl base class), and the type
    isn't correctly transferred to the .designer.cs file (producing a compile
    error). If the correct user-control type declaration isn't added to the
    designer.cs file, you can optionally just delete it from the .designer.cs
    and add it the code-behind file of the page instead. VS 2005 will then
    avoid re-adding it to the .designer.cs file (it first looks in the
    code-behind file for declarations before updating the .designer.cs file on

    Please check if the controls you mentioned that having the issue are of
    this type: if you've specifically overridden the type of the UserControl,
    then the migration wizard will not create them in the designer file.

    If you think the guide doesn't help or your project has some specific
    issues, please help me to further troubleshoot this by sending me a smaller
    but still reproducible project. Thank you for the trouble in advance.

    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    For MSDN subscribers whose posts are left unanswered, please check this

    Get notification to my posts through email? Please refer to
    ications. If you are using Outlook Express/Windows Mail, please make sure
    you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
    see your reply promptly.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Aug 8, 2007
    1. Advertisements

  3. Hi Rick,

    I'm writing to check the status of this post. Please feel free to let me
    know if there's anything else I can help. Thanks.

    Walter Wang (, 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.
    Walter Wang [MSFT], Aug 13, 2007
    1. Advertisements

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. Sean
  2. David Lozzi
  3. Samuel R. Neff
    Samuel R. Neff
    Jan 2, 2008
  4. Andy B
    Andy B
    Aug 13, 2008
  5. mark4asp

    Convert Web-site to Web Application.

    mark4asp, Jul 1, 2009, in forum: ASP .Net
    Jul 1, 2009

Share This Page