Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Using UserControls in a DLL

Reply
Thread Tools

Using UserControls in a DLL

 
 
Rory
Guest
Posts: n/a
 
      07-28-2003
You need to create a refrence to the usercontrol project
(assuming you created this in vs.net) in your current
projects refrences. Alternatively, you could compile your
user control into a dll (ie composite control).


>-----Original Message-----
>Hi all,
>
>Situation:
>- Visual Studio 2002
>- ASP.NET web project
>- VB.NET
>
>I created some webforms with many controls (buttons,

labels,
>usercontrols,...) on it.
>Every form has in its' load-event a functioncall to a

function in an
>external DLL.
>The argument of that function is the "Me", the active

form.
>-------------
>Private Sub Page_Load(ByVal sender As System.Object,

ByVal e As
>System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> performExternalFunctionInDLL(Me)
>End Sub
>-------------
>
>In that function (DLL build in another solution), I need

to modify the
>properties of each control (fe. the colors or size).
>This works for every standard control (button, label,

radiobuttom,
>hyperlinkcontrol,...) with a simple loop that checks

every control on the
>form and converts it to the TypeOf.
>Fe. when found "textBox1", TypeOf "TextBox", "textBox1"

will be converted to
>"TextBox". Then I can modify the properties of that

textbox.
>Now I need to modify some properties of my userControl

(properties I created
>my own). It is possible to find that control, but when I

want to convert it,
>I can't convert to "myUserControl", so I need a reference

or something.
>"myUserControl" has only it's .ascx and .vb (using a

codebehind-file) files,
>but I can't import that into my external DLL. How can I

use, import or
>define "myUserControl" in my external project?
>Anyone a suitable solution or suggestion for this problem?
>
>Thanks in advance!
>
>Sam
>
>
>.
>

 
Reply With Quote
 
 
 
 
Sam Vanderstraeten
Guest
Posts: n/a
 
      07-28-2003
Hi Rory,

Thanks for your reply! I tried to add the two projects into one single
solution, but this gives lots of "Dependency errors"... Both are totally
different projects. I could make that reference, but none of the projects
would run...
Can you please tell me how I can make a DLL of a UserControl? How can this
be done?

Thanks agian!

Sam


"Rory" <(E-Mail Removed)> schreef in bericht
news:04f001c354db$db02ca30$(E-Mail Removed)...
> You need to create a refrence to the usercontrol project
> (assuming you created this in vs.net) in your current
> projects refrences. Alternatively, you could compile your
> user control into a dll (ie composite control).
>
>
> >-----Original Message-----
> >Hi all,
> >
> >Situation:
> >- Visual Studio 2002
> >- ASP.NET web project
> >- VB.NET
> >
> >I created some webforms with many controls (buttons,

> labels,
> >usercontrols,...) on it.
> >Every form has in its' load-event a functioncall to a

> function in an
> >external DLL.
> >The argument of that function is the "Me", the active

> form.
> >-------------
> >Private Sub Page_Load(ByVal sender As System.Object,

> ByVal e As
> >System.EventArgs) Handles MyBase.Load
> > 'Put user code to initialize the page here
> > performExternalFunctionInDLL(Me)
> >End Sub
> >-------------
> >
> >In that function (DLL build in another solution), I need

> to modify the
> >properties of each control (fe. the colors or size).
> >This works for every standard control (button, label,

> radiobuttom,
> >hyperlinkcontrol,...) with a simple loop that checks

> every control on the
> >form and converts it to the TypeOf.
> >Fe. when found "textBox1", TypeOf "TextBox", "textBox1"

> will be converted to
> >"TextBox". Then I can modify the properties of that

> textbox.
> >Now I need to modify some properties of my userControl

> (properties I created
> >my own). It is possible to find that control, but when I

> want to convert it,
> >I can't convert to "myUserControl", so I need a reference

> or something.
> >"myUserControl" has only it's .ascx and .vb (using a

> codebehind-file) files,
> >but I can't import that into my external DLL. How can I

> use, import or
> >define "myUserControl" in my external project?
> >Anyone a suitable solution or suggestion for this problem?
> >
> >Thanks in advance!
> >
> >Sam
> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine if a DLL is a COM DLL or .NET DLL Anushi ASP .Net 5 10-28-2004 01:59 PM
Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)? H. Simpson Ruby 4 08-03-2004 04:45 PM
mprapi.dll --> samlib.dll --> ntdll.dll issue. Some1 Computer Support 4 04-05-2004 02:02 AM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM
Re: Using UserControls in a DLL Jody Fisher ASP .Net 1 07-29-2003 07:30 AM



Advertisments