Error referencing class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jodman
    New Member
    • Feb 2007
    • 1

    #1

    Error referencing class

    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_CurrentDat e' 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.
Working...