Home All Groups Group Topic Archive Search About

VB Module functions not available in 2005

Author
28 Jul 2006 2:45 PM
BigJohn
I have upgraded my ASP.Net/VB solution from 2003 to 2005.  In 2003 I had a VB
Module with global functions referenced in virtually all ASP.Net VB modules. 
After the upgrade to 2005 the ASP.Net VB code no longer recognizes my global
VB Module functions.

How do I reference the functions in the module?

I have over 25 ASP.Net forms.

Thank you

Author
29 Jul 2006 1:00 AM
David Anton
Prefix the method names with the module name.
e.g., YourModule.YourFunction instead of YourFunction
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
C# Code Metrics: Quick metrics for C#


Show quoteHide quote
"BigJohn" wrote:

> I have upgraded my ASP.Net/VB solution from 2003 to 2005.  In 2003 I had a VB
> Module with global functions referenced in virtually all ASP.Net VB modules. 
> After the upgrade to 2005 the ASP.Net VB code no longer recognizes my global
> VB Module functions.
>
> How do I reference the functions in the module?
>
> I have over 25 ASP.Net forms.
>
> Thank you
>
>
Author
29 Jul 2006 8:28 PM
Chris
Does ModuleName.FunctionName() work?


Show quoteHide quote
"BigJohn" <bigjohn@newsgroup.nospam> wrote in message
news:5B0FC488-066D-403A-809B-E94C4EFBFEDF@microsoft.com...
>I have upgraded my ASP.Net/VB solution from 2003 to 2005.  In 2003 I had a
>VB
> Module with global functions referenced in virtually all ASP.Net VB
> modules.
> After the upgrade to 2005 the ASP.Net VB code no longer recognizes my
> global
> VB Module functions.
>
> How do I reference the functions in the module?
>
> I have over 25 ASP.Net forms.
>
> Thank you
>
>
Author
30 Jul 2006 3:19 PM
Jay B. Harlow [MVP - Outlook]
BigJohn,
Is the module in the App_Code folder of your web app?

Is there a namespace in the module?

I am able to put the following in App_Code/UtilityModule.vb and it gets used
by my aspx pages.

    Option Strict On
    Option Explicit On

    Public Module UtilityModule

        Public Function IIf(Of T)(ByVal expression As Boolean, ByVal
truePart As T, ByVal falsePart As T) As T
            If expression Then
                Return truePart
            Else
                Return falsePart
            End If
        End Function

    End Module

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"BigJohn" <bigjohn@newsgroup.nospam> wrote in message
news:5B0FC488-066D-403A-809B-E94C4EFBFEDF@microsoft.com...
|I have upgraded my ASP.Net/VB solution from 2003 to 2005.  In 2003 I had a
VB
| Module with global functions referenced in virtually all ASP.Net VB
modules.
| After the upgrade to 2005 the ASP.Net VB code no longer recognizes my
global
| VB Module functions.
|
| How do I reference the functions in the module?
|
| I have over 25 ASP.Net forms.
|
| Thank you
|
|
Author
31 Jul 2006 12:21 PM
BigJohn
Thank you Jay.  Here is what I found and the correction taken.

In 2003 I had a folder named "GlobalComponents" which contained various
function, file and database functions.  When I upgraded, these modules
remained in a folder named "GlobalComponents".  When I moved them to
App_Code, all references functioned fine.
Author
31 Jul 2006 11:15 PM
Jay B. Harlow [MVP - Outlook]
Thanks for the follow up.


--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
"BigJohn" <bigjohn@newsgroup.nospam> wrote in message
news:623BBD9B-1D94-424C-A6D4-39A9880A3605@microsoft.com...
| Thank you Jay.  Here is what I found and the correction taken.
|
| In 2003 I had a folder named "GlobalComponents" which contained various
| function, file and database functions.  When I upgraded, these modules
| remained in a folder named "GlobalComponents".  When I moved them to
| App_Code, all references functioned fine.