Solved

Calling a .NET class in ASP

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now