|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB Module functions not available in 2005I 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 Prefix the method names with the module name.
e.g., YourModule.YourFunction instead of YourFunction -- Show quoteHide quoteDavid 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# "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 > > 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 > > 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 -- Show quoteHide quoteHope this helps Jay B. Harlow [MVP - Outlook] ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "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 | | 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. Thanks for the follow up.
-- Show quoteHide quoteHope this helps Jay B. Harlow [MVP - Outlook] ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "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.
dim differences
how to make my own classes show their methods and/or variables while typing? Killing a Process if no App. ADO.NET dataset limit SendKeys problem when using Non-English Windows keyboard layouts GDI+ Graphics Dump Q: Vb.net serial port help Ping subnet Can you send a "Get" request through a browser? Q: Vb.net serial port help |
|||||||||||||||||||||||