Solved

Calling a .NET class in ASP

Posted on 2006-10-25
2
256 Views
Last Modified: 2013-11-25
I have a class USER in my VB.NET code behind. How can I use this class in the ASP page code?

Public Class clsUser

    Dim _userID As Int16
    Dim _fName As String
    Dim _lName As String

    Public Property UserID() As Int16
        Get
            Return _userID
        End Get
        Set(ByVal Value As Int16)
            _userID = Value
        End Set
    End Property

    Public Property FirstName()
        Get
            Return _fName
        End Get
        Set(ByVal Value)
            _fName = Value
        End Set
    End Property
    Public Property LastName()
        Get
            Return _lName
        End Get
        Set(ByVal Value)
            _lName = Value
        End Set
    End Property
End Class
0
Comment
Question by:kevman123
2 Comments
 
LVL 27

Accepted Solution

by:
Sammy earned 500 total points
ID: 17805493
The only way to do this by giving your assembly a strong name, and wrap the assembly in a COM wrapper.
then you can call the methods just like you call them in asp.net
take a look here for more http://www.codeproject.com/dotnet/nettocom.asp?select=1005526&df=100&forumid=14076&msg=1005526

0
 

Author Comment

by:kevman123
ID: 17806248
Thanks!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question