Visual Studio .NET 2005 using Web Application Project

Discussion in 'ASP .Net Building Controls' started by Nathan Sokalski, Jul 3, 2006.

  1. Because I wanted the builds for my ASP.NET sites to be a single *.dll in a
    /bin/ directory (like VSNET 2003), I decided to try the Web Application
    Project download. However, I am still pulling my hair out because it doesn't
    want to recognize any of the Controls (not even the ones that are part of
    ASP.NET). All of the Controls show the following error:

    Name 'mycontrolid' is not declared.

    And my UserControls show the following error (all my UserControls are in the
    same directory as my Pages and I do have them registered with the register
    directive):

    Element 'myusercontrolclassname' is not a known element. This can occur if
    there is a compilation error in the Web site.

    Can anybody help me find an easy way to move my 2003 ASP.NET code to Visual
    Studio .NET 2005 and be able to have a single *.dll generated? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Jul 3, 2006
    #1
    1. Advertising

  2. Nathan,

    That way of using ASPNET creates more code pages than the website style did
    you got those.

    There has to be as well a pages as

    Mypage.designer.vb

    In that are your controls declared in a kind of global way to the page.

    Cor

    "Nathan Sokalski" <> schreef in bericht
    news:%...
    > Because I wanted the builds for my ASP.NET sites to be a single *.dll in a
    > /bin/ directory (like VSNET 2003), I decided to try the Web Application
    > Project download. However, I am still pulling my hair out because it
    > doesn't want to recognize any of the Controls (not even the ones that are
    > part of ASP.NET). All of the Controls show the following error:
    >
    > Name 'mycontrolid' is not declared.
    >
    > And my UserControls show the following error (all my UserControls are in
    > the same directory as my Pages and I do have them registered with the
    > register directive):
    >
    > Element 'myusercontrolclassname' is not a known element. This can occur if
    > there is a compilation error in the Web site.
    >
    > Can anybody help me find an easy way to move my 2003 ASP.NET code to
    > Visual Studio .NET 2005 and be able to have a single *.dll generated?
    > Thanks.
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
     
    Cor Ligthert [MVP], Jul 4, 2006
    #2
    1. Advertising

  3. Nathan Sokalski

    Rick Strahl Guest

    Do you see the .designer.cs or .vb file for your Page class? Make sure that
    exists and that the control definition you are trying to access exists
    inside of the file.

    If you ported your application from a stock project, make sure you Convert
    to Web Application first as this will convert a standard page to a WAP page
    with the required designer files. VS2005 from then on should update that
    ..designer.cs file when you make a change. In my experience this isn't 100%
    reliable unless you go into the visual designer and save - making changes in
    the HTML source view often doesn't update the .designer file.

    Hope this helps,

    +++ Rick ---

    --

    Rick Strahl
    West Wind Technologies
    http://www.west-wind.com/weblog
    http://www.west-wind.com/wwThreads/


    "Nathan Sokalski" <> wrote in message
    news:%...
    > Because I wanted the builds for my ASP.NET sites to be a single *.dll in a
    > /bin/ directory (like VSNET 2003), I decided to try the Web Application
    > Project download. However, I am still pulling my hair out because it
    > doesn't want to recognize any of the Controls (not even the ones that are
    > part of ASP.NET). All of the Controls show the following error:
    >
    > Name 'mycontrolid' is not declared.
    >
    > And my UserControls show the following error (all my UserControls are in
    > the same directory as my Pages and I do have them registered with the
    > register directive):
    >
    > Element 'myusercontrolclassname' is not a known element. This can occur if
    > there is a compilation error in the Web site.
    >
    > Can anybody help me find an easy way to move my 2003 ASP.NET code to
    > Visual Studio .NET 2005 and be able to have a single *.dll generated?
    > Thanks.
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
     
    Rick Strahl, Jul 9, 2006
    #3
    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. ad
    Replies:
    5
    Views:
    1,622
  2. Nathan Sokalski
    Replies:
    2
    Views:
    1,763
    Rick Strahl
    Jul 9, 2006
  3. rockdale
    Replies:
    1
    Views:
    702
    Juan T. Llibre
    Aug 23, 2006
  4. ITistic
    Replies:
    2
    Views:
    449
    ITistic
    Aug 21, 2007
  5. jonny
    Replies:
    1
    Views:
    496
    Michael Nemtsev
    Oct 6, 2007
Loading...

Share This Page