Add Module to ASP.NET site

  • Thread starter Thread starter les
  • Start date Start date
L

les

Hello,

I get the error on refering to the function created in the module. I've
tried to declare the module but it is not halping. Please let me know what
I'm doing wrong.

This is my declaration in the ASPX file:
----------------------------------------------------------------------------
------------------------------
'reference to the function
HashData("teststring")
----------------------------------------------------------------------------
------------------------------



This the error that I get on the page:
----------------------------------------------------------------------------
------------------------------
Compiler Error Message: BC30451: Name 'HashData' is not declared.
----------------------------------------------------------------------------
------------------------------



This is my module: modEncrypt.vb
----------------------------------------------------------------------------
------------------------------
Imports System.Text

Imports System.Security.Cryptography



Module modEncrypt

Public Function HashData(ByVal s As String) As String

'Convert the string to a byte array

Dim bytDataToHash As Byte() = (New
UnicodeEncoding()).GetBytes(s)

'Compute the MD5 hash algorithm

Dim bytHashValue As Byte() = New
MD5CryptoServiceProvider().ComputeHash(bytDataToHash)

Return BitConverter.ToString(bytHashValue)

End Function

End Module

----------------------------------------------------------------------------
------------------------------



Anyhelp is greatly appreciated,
Les
 
Yes,

I've got the same error:

Compiler Error Message: BC30451: Name 'modEncrypt' is not declared.


les
 
Back
Top