Solved

Calling a .NET class in ASP

Posted on 2006-10-25
2
255 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

777 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