VS 2005 nightmares

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Doug

    #1

    VS 2005 nightmares

    In VB.NET 2003 I was doing the following(in codebehind) and it worked great.
    In 2005 "WebMain" in no where in scope. How do I make "WebMain" visible to
    all Code-Behind classes? Note: these classes are codebehinds of web pages.

    Here's the weird part, I had it work once , then it never worked again.

    Public Class WebMain

    Inherits System.Web.UI.P age

    Protected Utilitiess As New Utilities

    End Class

    Public Class Foo

    Inherits WebMain

    End Class




  • Scott M.

    #2
    Re: VS 2005 nightmares

    Where are you creating WebMain?

    Is it in your root namespace? Also, try changing the scope from Public to
    Friend.



    "Doug" <Doug@discussio ns.microsoft.co mwrote in message
    news:5E00CCD2-B7FB-4C70-9E28-206DE6575FD1@mi crosoft.com...
    In VB.NET 2003 I was doing the following(in codebehind) and it worked
    great.
    In 2005 "WebMain" in no where in scope. How do I make "WebMain" visible
    to
    all Code-Behind classes? Note: these classes are codebehinds of web
    pages.
    >
    Here's the weird part, I had it work once , then it never worked again.
    >
    Public Class WebMain
    >
    Inherits System.Web.UI.P age
    >
    Protected Utilitiess As New Utilities
    >
    End Class
    >
    Public Class Foo
    >
    Inherits WebMain
    >
    End Class
    >
    >
    >
    >

    Comment

    • Doug

      #3
      Re: VS 2005 nightmares

      It's in the root. Friend definitely will not work. I tried moving the
      ..aspx and the aspx.vb files to app_coode, but that generates ambiguous
      referrences and/or 'context' is not defined.

      The really sick part is. I created another page where the class is also
      inherited from Webmain, and THAT ONE WORKS! I see no consistancy whatsoever
      with this, as the 2 pages and assiciated classes look identical to me. So
      much for backwards compatability with MS.



      "Scott M." wrote:
      Where are you creating WebMain?
      >
      Is it in your root namespace? Also, try changing the scope from Public to
      Friend.
      >
      >
      >
      "Doug" <Doug@discussio ns.microsoft.co mwrote in message
      news:5E00CCD2-B7FB-4C70-9E28-206DE6575FD1@mi crosoft.com...
      In VB.NET 2003 I was doing the following(in codebehind) and it worked
      great.
      In 2005 "WebMain" in no where in scope. How do I make "WebMain" visible
      to
      all Code-Behind classes? Note: these classes are codebehinds of web
      pages.

      Here's the weird part, I had it work once , then it never worked again.

      Public Class WebMain

      Inherits System.Web.UI.P age

      Protected Utilitiess As New Utilities

      End Class

      Public Class Foo

      Inherits WebMain

      End Class


      >
      >
      >

      Comment

      • Mythran

        #4
        Re: VS 2005 nightmares


        "Doug" <Doug@discussio ns.microsoft.co mwrote in message
        news:63E8F64F-018C-40E2-88D9-2FF43BCC0081@mi crosoft.com...
        It's in the root. Friend definitely will not work. I tried moving the
        .aspx and the aspx.vb files to app_coode, but that generates ambiguous
        referrences and/or 'context' is not defined.
        >
        The really sick part is. I created another page where the class is also
        inherited from Webmain, and THAT ONE WORKS! I see no consistancy
        whatsoever
        with this, as the 2 pages and assiciated classes look identical to me. So
        much for backwards compatability with MS.
        >
        >
        >
        "Scott M." wrote:
        >
        >Where are you creating WebMain?
        >>
        >Is it in your root namespace? Also, try changing the scope from Public
        >to
        >Friend.
        >>
        >>
        >>
        >"Doug" <Doug@discussio ns.microsoft.co mwrote in message
        >news:5E00CCD 2-B7FB-4C70-9E28-206DE6575FD1@mi crosoft.com...
        In VB.NET 2003 I was doing the following(in codebehind) and it worked
        great.
        In 2005 "WebMain" in no where in scope. How do I make "WebMain"
        visible
        to
        all Code-Behind classes? Note: these classes are codebehinds of web
        pages.
        >
        Here's the weird part, I had it work once , then it never worked again.
        >
        Public Class WebMain
        >
        Inherits System.Web.UI.P age
        >
        Protected Utilitiess As New Utilities
        >
        End Class
        >
        Public Class Foo
        >
        Inherits WebMain
        >
        End Class
        >
        >
        >
        >
        >>
        >>
        >>
        You may want to look into the VS 2005 Web Application Project download
        available from Microsoft. This makes converting from 2003 to 2005 much much
        much much (... get the idea) much much much easier :)



        HTH,
        Mythran


        Comment

        Working...