Solved

Calling a .NET class in ASP

Posted on 2006-10-25
2
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

751 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