473,761 Members | 5,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add Module to ASP.NET site

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("tests tring")
----------------------------------------------------------------------------
------------------------------

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
MD5CryptoServic eProvider().Com puteHash(bytDat aToHash)

Return BitConverter.To String(bytHashV alue)

End Function

End Module

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

Anyhelp is greatly appreciated,
Les

Nov 17 '05 #1
1 1343
les
Yes,

I've got the same error:

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

"John Saunders" <jo***********@ surfcontrol.com > wrote in message
news:Op******** ******@TK2MSFTN GP09.phx.gbl...
Did you try modEncrypt.Hash Data?

--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com
"les" <bennettdotdill @no_spamburke.c om> wrote in message
news:eG******** **********@news 20.bellglobal.c om...
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("tests tring")


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

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
MD5CryptoServic eProvider().Com puteHash(bytDat aToHash)

Return BitConverter.To String(bytHashV alue)

End Function

End Module


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

Anyhelp is greatly appreciated,
Les


Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
17715
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
3
2570
by: Steven Gutstein | last post by:
This is probably a fairly newbie type problem, but I'm trying to use PyOpenGL, and don't seem to have installed it correctly. I'm running Python 2.3 on a Windows NT machine. Whenever I go into IDLE and type from OpenGL.GL import * I get a flagrant crash which shuts down IDLE.
5
9453
by: Marcus Lowland | last post by:
Hello, I'm fairly new to python and have read about and wanted to begin experimenting with cpickle. As I understand, this should be a native module in the python library. I have python 2.3 and now just installed 2.4, but am not able to import or find cpickle.py in any directory of the install, or in the previous version (pickle.py is present and imports correctly). Is there a seperate module package that must be downloaded and installed......
7
781
by: Alex | last post by:
Hi all, I've found a module that I think will help me combine fields properly, but I'm unsure how to add or use it with Access 2000. Below is the module I'd like to add: http://www.mvps.org/access/modules/mdl0008.htm In Access, I goto Modules and create new. Leaving 'Option Compare Database' on top I paste the module code in and save - naming it fConcatFld. It saves fine, but when I use fConcatFld in my query, like below:
1
1551
by: aznach | last post by:
Hello! I have a shared hosting account at GrokThis.net and have a problem with the module order of the Python search path. I'd like to use django's svn trunk instead of the "Django-0.95-py2.4.egg" provided in site-packages. The problem is that the "django egg" gets preference over the "django svn trunk" module I manually added to PYTHONPATH...
6
2360
by: usenet1 | last post by:
I'm a newbie with hopefully an easy question. I'm trying to write some "C" code that will run a python script that can in turn call some "C" functions. However I'm having a problem getting started because although I can run a script from the python ide that imports ctypes, when I execute that 'import ctypes' code from the "C" code I get the following error: 'import site' failed; use -v for traceback Traceback (most recent call last):
0
1233
by: Lie | last post by:
Yesterday I installed compiz-icon in my Ubuntu. Today, when I go to the python interpreter, I happen to do this: ### START OF PYTHON SESSION ### Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) on linux2 Type "help", "copyright", "credits" or "license" for more information. Welcome to Python 2.5! This is the online help utility.
0
1676
by: norseman | last post by:
mercado mercado wrote: ========================================================== Yes, but you may not like it. I do what you do. Prod and devel subdirs. I store the paths in a var at the top of my programs. I change it(them) when the program graduates. example:
0
1843
by: Matt Nordhoff | last post by:
Barak, Ron wrote: For some reason, when you run "import locale", it's importing wx.locale instead of the "locale" module from the stdlib. However, I have no idea why that would be happening... Did you do something to add wx to your PYTHONPATH? Maybe do "import sys; print sys.path" or "import os; print os.environ" to verify this. (Hopefully someone more knowledgeable than me will come along soon.)
3
13447
ram09
by: ram09 | last post by:
After deploying our site in the iis7 server, we encountered this error... ModuleName AspNetInitializationExceptionModule Notification 1 HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode 0 ConfigExceptionInfo Notification BEGIN_REQUEST
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.