|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VS 2005 nightmaresIn 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.Page Protected Utilitiess As New Utilities End Class Public Class Foo Inherits WebMain End Class Where are you creating WebMain?
Is it in your root namespace? Also, try changing the scope from Public to Friend. Show quoteHide quote "Doug" <D***@discussions.microsoft.com> wrote in message news:5E00CCD2-B7FB-4C70-9E28-206DE6575FD1@microsoft.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.Page > > Protected Utilitiess As New Utilities > > End Class > > Public Class Foo > > Inherits WebMain > > End Class > > > > 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. Show quoteHide quote "Scott M." wrote: > Where are you creating WebMain? > > Is it in your root namespace? Also, try changing the scope from Public to > Friend. > > > > "Doug" <D***@discussions.microsoft.com> wrote in message > news:5E00CCD2-B7FB-4C70-9E28-206DE6575FD1@microsoft.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.Page > > > > Protected Utilitiess As New Utilities > > > > End Class > > > > Public Class Foo > > > > Inherits WebMain > > > > End Class > > > > > > > > > > >
Show quote
Hide quote
"Doug" <D***@discussions.microsoft.com> wrote in message You may want to look into the VS 2005 Web Application Project download news:63E8F64F-018C-40E2-88D9-2FF43BCC0081@microsoft.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" <D***@discussions.microsoft.com> wrote in message >> news:5E00CCD2-B7FB-4C70-9E28-206DE6575FD1@microsoft.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.Page >> > >> > Protected Utilitiess As New Utilities >> > >> > End Class >> > >> > Public Class Foo >> > >> > Inherits WebMain >> > >> > End Class >> > >> > >> > >> > >> >> >> available from Microsoft. This makes converting from 2003 to 2005 much much much much (... get the idea) much much much easier :) http://weblogs.asp.net/scottgu/archive/2006/05/08/445742.aspx HTH, Mythran
some general mouse events should be there
newbie question Memory leaks? VB.net 2003/2005- Can't figure out how to test for working internet connection "Optional" reference? Convert C# "writer.Write(@" to VB ? ASP web app Adding a control programmatically... Oracle throwing an exception, "ORA-01036: illegal variable name/nu Multi-panel dock |
|||||||||||||||||||||||