Hi all,
I am creating a web application in APS.NET using Microsoft visual web developer.
At the moment I have a large VB script that generates a text version of the current date when the page loads and I would like to move it to a separate VB file for use on other pages throughout my application.
I created a new class, declared as follows:
Public Class DateFormatting
Public Shared Function Get_CurrentDate() As String
In my ASPX page I call the “getdate” function as follows:
DateFormatting.Get_CurrentDate().
I get no errors displayed on the error list at the bottom of my screen but when I load this to my server and attempt to visit the page, I get the following error:
BC30451: Name 'Get_CurrentDate' is not declared.
Do I need to reference the class within my ASPX page, if so can anyone advise how I write the code to do this.
Thanks.