Add Module to ASP.NET site

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
 
L

les

Yes,

I've got the same error:

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


les
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top