Can I use a C# dll within a vb project?

M

mohaaron

I'm trying to create a custom assembly which will be used as a helper
class for a asp.net web application. The project is a C# class library
written using .net 2.0. I need to be able to use this class library in
a 1.1 web application. Is this possible?

I related problem that I'm having is that I have created the C# class
library project and added a reference to it from my 2.0 web
application and I can't seem to use it inline in the aspx code. Can
anyone tell me what I need to do to make a dll excesable in the aspx
code?

In case it helps what I have is a class with one static property which
I would like to call in the aspx code like this.

<%= Namespace.ClassName.StatisProperty %>

This throws an error like, "the class is not available within the
context.".
 
C

Cowboy \(Gregory A. Beamer\)

I'm trying to create a custom assembly which will be used as a helper
class for a asp.net web application. The project is a C# class library
written using .net 2.0. I need to be able to use this class library in
a 1.1 web application. Is this possible?

I related problem that I'm having is that I have created the C# class
library project and added a reference to it from my 2.0 web
application and I can't seem to use it inline in the aspx code. Can
anyone tell me what I need to do to make a dll excesable in the aspx
code?

Place a service between your code and the 2.0 code or compile your code for
2.0.
In case it helps what I have is a class with one static property which
I would like to call in the aspx code like this.

<%= Namespace.ClassName.StatisProperty %>

This throws an error like, "the class is not available within the
context.".

And, you will never be able to use it directly in a 1.1 application. If you
have the source, maybe you can dumb down the 2.0 bits to 1.1 and use them.
Otherwise, you will have to create a service to contact the 2.0 bits.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top