473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Using a dll user control in ASP.NET

I'm looking for the best way to make se of the function is a dll user
control in an ASP.NET page. I've been unable to find anything specific to
demonstrate how this can be achieved.

Mike
Nov 18 '05 #1
10 1778
Could you ask that in more understandable terms, please?

What is "a dll user control?" And what do you mean by "the best way to make
[u]se of the function i[n] a dll user control"?

The best way to make use of a hammer is to hammer nails with it. The best
way to make use of any tool is to use it for what it is designed for.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#7**************@TK2MSFTNGP11.phx.gbl...
I'm looking for the best way to make se of the function is a dll user
control in an ASP.NET page. I've been unable to find anything specific to
demonstrate how this can be achieved.

Mike

Nov 18 '05 #2
Kevin,
I've got a .NET dll which I would normally use within a VB.NET application.
It provides me with a set of classes and functions I can use to connect to a
back-end server. I'd like to be able to make use of those same classes and
functions in an ASP.NET page.

In an ASP page I would use the CreateObject() function to make use of the
classes in the equivalent COM object.

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Could you ask that in more understandable terms, please?

What is "a dll user control?" And what do you mean by "the best way to
make
[u]se of the function i[n] a dll user control"?

The best way to make use of a hammer is to hammer nails with it. The best
way to make use of any tool is to use it for what it is designed for.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#7**************@TK2MSFTNGP11.phx.gbl...
I'm looking for the best way to make se of the function is a dll user
control in an ASP.NET page. I've been unable to find anything specific to
demonstrate how this can be achieved.

Mike


Nov 18 '05 #3
Okay, Mike. What you have is not a "Control" - a Control in ASP.Net is a
class which renders UI. It sounds like what you've got is a Class Library.
If so, all you need to do is create a reference to the DLL, and use it like
any other .Net DLL (Such as the built-in System.DLL, System.Web.DLL, etc).

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#q**************@TK2MSFTNGP09.phx.gbl...
Kevin,
I've got a .NET dll which I would normally use within a VB.NET application. It provides me with a set of classes and functions I can use to connect to a back-end server. I'd like to be able to make use of those same classes and
functions in an ASP.NET page.

In an ASP page I would use the CreateObject() function to make use of the
classes in the equivalent COM object.

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Could you ask that in more understandable terms, please?

What is "a dll user control?" And what do you mean by "the best way to
make
[u]se of the function i[n] a dll user control"?

The best way to make use of a hammer is to hammer nails with it. The best way to make use of any tool is to use it for what it is designed for.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#7**************@TK2MSFTNGP11.phx.gbl...
I'm looking for the best way to make se of the function is a dll user
control in an ASP.NET page. I've been unable to find anything specific to demonstrate how this can be achieved.

Mike



Nov 18 '05 #4
Kevin,
As in :

@Register TagPrefix="MyClass" Namespace="CustomControls"
Assembly="~\Controls\My.dll" ?

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:um*************@TK2MSFTNGP10.phx.gbl...
Okay, Mike. What you have is not a "Control" - a Control in ASP.Net is a
class which renders UI. It sounds like what you've got is a Class Library.
If so, all you need to do is create a reference to the DLL, and use it
like
any other .Net DLL (Such as the built-in System.DLL, System.Web.DLL, etc).

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#q**************@TK2MSFTNGP09.phx.gbl...
Kevin,
I've got a .NET dll which I would normally use within a VB.NET

application.
It provides me with a set of classes and functions I can use to connect
to

a
back-end server. I'd like to be able to make use of those same classes
and
functions in an ASP.NET page.

In an ASP page I would use the CreateObject() function to make use of the
classes in the equivalent COM object.

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Could you ask that in more understandable terms, please?
>
> What is "a dll user control?" And what do you mean by "the best way to
> make
> [u]se of the function i[n] a dll user control"?
>
> The best way to make use of a hammer is to hammer nails with it. The best > way to make use of any tool is to use it for what it is designed for.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Mike Street" <Mi***@jBASE.com> wrote in message
> news:#7**************@TK2MSFTNGP11.phx.gbl...
>> I'm looking for the best way to make se of the function is a dll user
>> control in an ASP.NET page. I've been unable to find anything specific to >> demonstrate how this can be achieved.
>>
>> Mike
>>
>>
>
>



Nov 18 '05 #5
Well, what environment are you developing in?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#Q*************@TK2MSFTNGP10.phx.gbl...
Kevin,
As in :

@Register TagPrefix="MyClass" Namespace="CustomControls"
Assembly="~\Controls\My.dll" ?

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:um*************@TK2MSFTNGP10.phx.gbl...
Okay, Mike. What you have is not a "Control" - a Control in ASP.Net is a
class which renders UI. It sounds like what you've got is a Class Library. If so, all you need to do is create a reference to the DLL, and use it
like
any other .Net DLL (Such as the built-in System.DLL, System.Web.DLL, etc).
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#q**************@TK2MSFTNGP09.phx.gbl...
Kevin,
I've got a .NET dll which I would normally use within a VB.NET

application.
It provides me with a set of classes and functions I can use to connect
to

a
back-end server. I'd like to be able to make use of those same classes
and
functions in an ASP.NET page.

In an ASP page I would use the CreateObject() function to make use of the classes in the equivalent COM object.

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Could you ask that in more understandable terms, please?
>
> What is "a dll user control?" And what do you mean by "the best way to > make
> [u]se of the function i[n] a dll user control"?
>
> The best way to make use of a hammer is to hammer nails with it. The

best
> way to make use of any tool is to use it for what it is designed for.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Mike Street" <Mi***@jBASE.com> wrote in message
> news:#7**************@TK2MSFTNGP11.phx.gbl...
>> I'm looking for the best way to make se of the function is a dll user >> control in an ASP.NET page. I've been unable to find anything
specific to
>> demonstrate how this can be achieved.
>>
>> Mike
>>
>>
>
>



Nov 18 '05 #6
Kevin,
Windows XP, .NET 1.1, VS .NET 2003

Mike
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:e2*************@TK2MSFTNGP11.phx.gbl...
Well, what environment are you developing in?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#Q*************@TK2MSFTNGP10.phx.gbl...
Kevin,
As in :

@Register TagPrefix="MyClass" Namespace="CustomControls"
Assembly="~\Controls\My.dll" ?

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:um*************@TK2MSFTNGP10.phx.gbl...
> Okay, Mike. What you have is not a "Control" - a Control in ASP.Net is
> a
> class which renders UI. It sounds like what you've got is a Class Library. > If so, all you need to do is create a reference to the DLL, and use it
> like
> any other .Net DLL (Such as the built-in System.DLL, System.Web.DLL, etc). >
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Mike Street" <Mi***@jBASE.com> wrote in message
> news:#q**************@TK2MSFTNGP09.phx.gbl...
>> Kevin,
>> I've got a .NET dll which I would normally use within a VB.NET
> application.
>> It provides me with a set of classes and functions I can use to
>> connect
>> to
> a
>> back-end server. I'd like to be able to make use of those same classes
>> and
>> functions in an ASP.NET page.
>>
>> In an ASP page I would use the CreateObject() function to make use of the >> classes in the equivalent COM object.
>>
>> Mike
>>
>> "Kevin Spencer" <ks******@takempis.com> wrote in message
>> news:%2****************@tk2msftngp13.phx.gbl...
>> > Could you ask that in more understandable terms, please?
>> >
>> > What is "a dll user control?" And what do you mean by "the best way to >> > make
>> > [u]se of the function i[n] a dll user control"?
>> >
>> > The best way to make use of a hammer is to hammer nails with it. The
> best
>> > way to make use of any tool is to use it for what it is designed
>> > for.
>> >
>> > --
>> > HTH,
>> > Kevin Spencer
>> > .Net Developer
>> > Microsoft MVP
>> > Big things are made up
>> > of lots of little things.
>> >
>> > "Mike Street" <Mi***@jBASE.com> wrote in message
>> > news:#7**************@TK2MSFTNGP11.phx.gbl...
>> >> I'm looking for the best way to make se of the function is a dll user >> >> control in an ASP.NET page. I've been unable to find anything specific > to
>> >> demonstrate how this can be achieved.
>> >>
>> >> Mike
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Nov 18 '05 #7
Add the DLL as a reference in your project references. Use an Imports
statement in your CodeBehind class:

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:eN**************@TK2MSFTNGP12.phx.gbl...
Kevin,
Windows XP, .NET 1.1, VS .NET 2003

Mike
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:e2*************@TK2MSFTNGP11.phx.gbl...
Well, what environment are you developing in?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mike Street" <Mi***@jBASE.com> wrote in message
news:#Q*************@TK2MSFTNGP10.phx.gbl...
Kevin,
As in :

@Register TagPrefix="MyClass" Namespace="CustomControls"
Assembly="~\Controls\My.dll" ?

Mike

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:um*************@TK2MSFTNGP10.phx.gbl...
> Okay, Mike. What you have is not a "Control" - a Control in ASP.Net is > a
> class which renders UI. It sounds like what you've got is a Class

Library.
> If so, all you need to do is create a reference to the DLL, and use it > like
> any other .Net DLL (Such as the built-in System.DLL, System.Web.DLL,

etc).
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Mike Street" <Mi***@jBASE.com> wrote in message
> news:#q**************@TK2MSFTNGP09.phx.gbl...
>> Kevin,
>> I've got a .NET dll which I would normally use within a VB.NET
> application.
>> It provides me with a set of classes and functions I can use to
>> connect
>> to
> a
>> back-end server. I'd like to be able to make use of those same classes >> and
>> functions in an ASP.NET page.
>>
>> In an ASP page I would use the CreateObject() function to make use of
the
>> classes in the equivalent COM object.
>>
>> Mike
>>
>> "Kevin Spencer" <ks******@takempis.com> wrote in message
>> news:%2****************@tk2msftngp13.phx.gbl...
>> > Could you ask that in more understandable terms, please?
>> >
>> > What is "a dll user control?" And what do you mean by "the best
way to
>> > make
>> > [u]se of the function i[n] a dll user control"?
>> >
>> > The best way to make use of a hammer is to hammer nails with it.

The > best
>> > way to make use of any tool is to use it for what it is designed
>> > for.
>> >
>> > --
>> > HTH,
>> > Kevin Spencer
>> > .Net Developer
>> > Microsoft MVP
>> > Big things are made up
>> > of lots of little things.
>> >
>> > "Mike Street" <Mi***@jBASE.com> wrote in message
>> > news:#7**************@TK2MSFTNGP11.phx.gbl...
>> >> I'm looking for the best way to make se of the function is a dll

user
>> >> control in an ASP.NET page. I've been unable to find anything

specific
> to
>> >> demonstrate how this can be achieved.
>> >>
>> >> Mike
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Nov 18 '05 #8
Hi Mike,

As Kevin has mentioned, the component dll is quite different from the
asp.net control (which is for web page UI design). And since you said that
the component is used be used in asp app as COM object, i think we need to
use .net's COM interop service to call the component rather than call it
directly.

#Microsoft .NET/COM Migration and Interoperability
http://msdn.microsoft.com/library/de...us/dnbda/html/
cominterop.asp

#Introduction to COM Interop
http://msdn.microsoft.com/library/de...us/vbcn7/html/
vaconintroductiontocominteroperability.asp

and when we use the "Add Reference" in VS.NET to refernce a COM dll in .net
application, the VS.NET IDE will automatically create the .net wrapper
classes(which can be directly used in managed code) for the COM components.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #9
Steven,
I have a .NET version of the dll, so I don't need to worry about COM
Interop.

I've now found a couple of examples which give me a basic framework to build
on.

Thanks,
Mike

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:Pr**************@cpmsftngxa10.phx.gbl...
Hi Mike,

As Kevin has mentioned, the component dll is quite different from the
asp.net control (which is for web page UI design). And since you said that
the component is used be used in asp app as COM object, i think we need to
use .net's COM interop service to call the component rather than call it
directly.

#Microsoft .NET/COM Migration and Interoperability
http://msdn.microsoft.com/library/de...us/dnbda/html/
cominterop.asp

#Introduction to COM Interop
http://msdn.microsoft.com/library/de...us/vbcn7/html/
vaconintroductiontocominteroperability.asp

and when we use the "Add Reference" in VS.NET to refernce a COM dll in
.net
application, the VS.NET IDE will automatically create the .net wrapper
classes(which can be directly used in managed code) for the COM
components.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #10
Hi Mike,

Thanks for your followup. Glad that you found some useful code samples. In
addition, if you have any other problems later, please feel free to post
here. Good LUck!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
11
by: Lloyd Sheen | last post by:
Is there any one who has actually done this. I have now scanned more web articles about this with the realization that not one of them (including MSDN docs) outlines how to do this. This is...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
2
by: Hans Merkl | last post by:
Hi, I am trying to use a user control as EditItemTemplate in a DataList. It loads fine but I can't figure out how to bind to the data of the DataList. Here is what I have got so far: ...
0
by: tony | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. In this user control we have a class...
5
by: Guy Noir | last post by:
I have a quick question on custom controls. I have a control that I created with a class that extends the NumericUpDown control. My problem is that when I use this usercontrol on my form, the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.