Error when converting website to web application

Last post 06-13-2008 5:38 AM by Thomas Sun – MSFT. 1 replies.

Sort Posts:

  • Error when converting website to web application

    06-11-2008, 9:18 AM
    • Loading...
    • BobRoss
    • Joined on 01-24-2007, 2:18 PM
    • Posts 18

    I have a vb.net 2.0 website and I am trying to change it to a web application.

    I have followed these instructions here - http://webproject.scottgu.com/Visua...Migration2.aspx
    up to the end of step 4.

    but at this point I get an error for every control on every page -
    Error 46 'SelectOrderLabel' is already declared as 'Protected Dim WithEvents SelectOrderLabel As System.Web.UI.WebControls.Label' in this class.

    Does anyone know why this might be

  • Re: Error when converting website to web application

    06-13-2008, 5:38 AM
    Answer

    Hi,

    The error message means that this control is declared more than one time.

    When you use "Convert to Web Application", Visual Studio 2005 automatically generate a .designer.vb file for page. Please make sure that you don't declare it in another place. You can search it using Ctrl+Shift+F.

    You also need to make sure that the designer file's Namespace matches codebehind Namespace.

     

    I hope this helps.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter