473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do I use a class with my asp.net page?

I have a class written in visual basic that I would like to call from
an aspx page.
The vb file is called "encryption.vb", and it contains:
Namespace Encryption
Public Class Hash
Public Class Symmetric
and more classes
I don't know how to call these classes from a aspx page. Do I need to
compile the encryption.vb file? And if so, how would I refer to the
classes from within my aspx page?
Thanks in advance
Marvin

Dec 5 '05 #1
2 920
Hi,
Compile it to .dll library file and add these .dll reference to ur
ASP.NET project.
"COHENMARVIN" wrote:
I have a class written in visual basic that I would like to call from
an aspx page.
The vb file is called "encryption.vb", and it contains:
Namespace Encryption
Public Class Hash
Public Class Symmetric
and more classes
I don't know how to call these classes from a aspx page. Do I need to
compile the encryption.vb file? And if so, how would I refer to the
classes from within my aspx page?
Thanks in advance
Marvin

Dec 5 '05 #2
Are these classes in the same project as the aspx page? If so, just
create a variable on the Form1.vb page (if you're using code-behind).
Keep in mind though, the name of the file has nothing to do with the
class itself, you actually just have two classes there, named Hash and
Symmetric. The namespace also cannot be initialized:

Private mHash As Encryption.Hash
Private mSymmetric As Encryption.Symmmetric

Private mEncryption As Encryption (this will not work)

Also, do you mean calling the classes from that actualy html source of
the file? That would be a little different.

Dec 5 '05 #3

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

Similar topics

5
by: ozie | last post by:
Hi , I am new to ASP.NET. I was reading about Page class in one of the ASP.NET books and am confused with the way the Page class is actually implemented.What is didnt understand in when is this...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
8
by: Franck Diastein | last post by:
Hi, I'm using DataGrid a lot, and I would like to make a class with DataGrid extended properties... I make a class like this: ------------------------------------------------------ using...
9
by: John Smith | last post by:
Hi, I have this problem. I have a page class in code behind called "WebForm1" and I have another class called "Class1". Now in Class1 I am creating ImageButton and I am adding event handler...
6
by: Max | last post by:
I need an vb.net class that is invoked from aspx page, that use the viewstate/session object. This class must be store the information into viewstate/session. Can you give me an example ? Thanks
7
by: Göran Tänzer | last post by:
Hi, i've written a class which does some calculations for my web application. These informatinos are different for each page request - the current user is not important. i have about 10 aspx...
6
by: Brad | last post by:
I am creating a class (not a control) which implements IStateManager. I've created the class and all of the implementations (LoadView, SaveViewState, etc...). My Question is: How do I...
15
by: Joe Fallon | last post by:
I would like to know how you can figure out how much memory a given instance of a class is using. For example, if I load a collection class with 10 items it might use 1KB, and if I load it with...
5
by: sck10 | last post by:
Hello, I am trying to add the following to a App_Code class. The error I am getting references "Page.Controls". I would like to call this from my content page which uses MasterPages I read...
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.