Help on <assemblies> key in web config file ???

G

Guest

Dear all,

I have read that instead of registering an assembly on the top a a page with
the Register directive we can use the <assembliea> section of Web config file
as follow :

<assemblies>
<add assembly="SharpUI.Input, Version=1.1.1.1220,
Culture=neutral,
PublicKeyToken=f517ee9424cd48d0"/>
</assemblies>

Then component within this assembly will be automatically register for
beeing used by all your application pages..

But then how can I use assembly components in my code? I thing I still need
to add my assembly as reference in my project or use the imports keywords ?

regards
serge
 
K

Karl Seguin

I believe this merely registers the assemblies so that they are visable in
your code. Much like going into VS.Net and click "Add Reference".

I believe what you want is to Register a namespace/assembly which contains
controls.

In 2.0 you can do this from the web.config, not in 1.x. Here's how you do it
in 2.0:

<pages>
<controls>
<add tagPrefix="X" namespace="XX" assembly="XXX" />
</controls>
</pages>


Karl
 
G

Guest

No it is in ASP 1.1

What I have read is that for instance if you have an assembly in GAC and
components in this assembly will be used on several page in the web
application
then you should use the <add> key of the <assemblies> section in web.config
file.

It says that this way links the assembly to the application and make the
assembly availabale to all web form...

But then how to refer it in code as it is needed either to imports or add it
with reference ??
 
K

Karl Seguin

Serge:
I'm answering this in your other thread, 'cuz I think it's more relevant.

Anyone interested should look for Serge's post entitiled "Simple Question :
reference vs Register"

Karl
 

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,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top