473,508 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Page

Protected Utilitiess As New Utilities

End Class

Public Class Foo

Inherits WebMain

End Class


Oct 12 '06 #1
3 928
Where are you creating WebMain?

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

"Doug" <Do**@discussions.microsoft.comwrote in message
news:5E**********************************@microsof t.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


Oct 13 '06 #2
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" <Do**@discussions.microsoft.comwrote in message
news:5E**********************************@microsof t.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




Oct 13 '06 #3

"Doug" <Do**@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.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" <Do**@discussions.microsoft.comwrote in message
news:5E**********************************@microso ft.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



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 :)

http://weblogs.asp.net/scottgu/archi...08/445742.aspx

HTH,
Mythran
Oct 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.