473,804 Members | 3,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

difference between assembly in aspx page and web.config?

I have some demo code that came with a 3rd party product. This is what it
looks like (I remove html braces in case it does not print right)

Register TagPrefix="pin" Namespace="Pint exx.Components. Web.pinTab"
Assembly="pinTa b"

That line of code was the 2nd line just below the Page Language="C#" ... in
default.aspx

I created a new, blank page, and attempted to copy and paste the control
onto the new page. Got an error message that the control was not registered
as follows: "This control cannot be displayed because its TagPrefix is not
registered in this Web Form."
OK, I assume I can easily fix that by copying that registration line to the
new page.

Was wondering why I got to do this in the first place? I noticed that my
web.config file has some assemblies such as:

<assemblies>
<add assembly="Syste m.Windows.Forms , Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= xxx"/>
<add assembly="Syste m.Security, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= xxx"/>
<add assembly="Acces sibility, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= xxx"/>
<add assembly="Syste m.Runtime.Seria lization.Format ters.Soap,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= xxx"/>
<add assembly="Syste m.Deployment, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= xxx"/>
</assemblies>

Can I put that pintab registration into web.config and avoid using that
registration code snippet altogether?
So what is the difference between an Assmbly in the aspx page and an
assembly in web.config?

The 3rd party control did not come with an install and it is not in the
toolbox for VS2005.
--
=============== =============== =============== =============== ==========
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=============== =============== =============== =============== ==========

Apr 24 '07 #1
2 7321
the <assembliesad ds dll's for compiling, usually ones not in the bin.
tagPrefix is used to define a prefix to identify 3rd party controls.
it can be specied in the web.config under system.web/pages/controls
instead of each page.

<controls>
<add tagPrefix="pin"
Namespace="Pint exx.Components. Web.pinTab" Assembly="pinTa b" />
</controls>

-- bruce (sqlwork.com)
Beemer Biker wrote:
I have some demo code that came with a 3rd party product. This is what
it looks like (I remove html braces in case it does not print right)

Register TagPrefix="pin" Namespace="Pint exx.Components. Web.pinTab"
Assembly="pinTa b"

That line of code was the 2nd line just below the Page Language="C#" ...
in default.aspx

I created a new, blank page, and attempted to copy and paste the control
onto the new page. Got an error message that the control was not
registered as follows: "This control cannot be displayed because its
TagPrefix is not registered in this Web Form."
OK, I assume I can easily fix that by copying that registration line to
the new page.

Was wondering why I got to do this in the first place? I noticed that
my web.config file has some assemblies such as:

<assemblies>
<add assembly="Syste m.Windows.Forms , Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= xxx"/>
<add assembly="Syste m.Security, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= xxx"/>
<add assembly="Acces sibility, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= xxx"/>
<add assembly="Syste m.Runtime.Seria lization.Format ters.Soap,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= xxx"/>
<add assembly="Syste m.Deployment, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= xxx"/>
</assemblies>

Can I put that pintab registration into web.config and avoid using that
registration code snippet altogether?
So what is the difference between an Assmbly in the aspx page and an
assembly in web.config?

The 3rd party control did not come with an install and it is not in the
toolbox for VS2005.

Apr 24 '07 #2

"bruce barker" <no****@nospam. comwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
the <assembliesad ds dll's for compiling, usually ones not in the bin.
tagPrefix is used to define a prefix to identify 3rd party controls. it
can be specied in the web.config under system.web/pages/controls instead
of each page.

<controls>
<add tagPrefix="pin"
Namespace="Pint exx.Components. Web.pinTab" Assembly="pinTa b" />
</controls>
Thanks Bruce! That worked.
I was able to remove all pintab registration from my C# files after I added
the following to web.config:

<pages>
<controls>
<add tagPrefix="pin" namespace="Pint exx.Components. Web.pinTab"
assembly="pinTa b" />
</controls>
</pages>
<compilation debug="true">
<assemblies>
<add assembly="pinTa b, Version=2.0.601 30.0, Culture=neutral ,
PublicKeyToken= xxx"/>
</assemblies>
</compilation>

So why do I have to add these? Should not the vendor have built the sofware
so that a drop from the VS2005 toolkit puts the correct assembly info in the
web.config? It did not come with a toolkit component, only source code
with those registration statements. I am just guesing about how that could
be done from a toolkit.

I would not have known to put that stuff there. A build did generate the
publickeytoken (that object of tha that assembly statement above) from their
original .aspx sample code, else I would not know the publickeytoken nor
version.

While I no longer need to have those prefix registration, I am still having
this problem that I posted earlier:
news:13******** *****@corp.supe rnews.com Re-sizing that pintab control
replaces "pin:Tab" with "Pintexx.Compon ents.Web.pinTab " which does not
compile as valid xhtml1.0 code. and I have to code pin:Tab tabprefix back
in.
--
=============== =============== =============== =============== ==========
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=============== =============== =============== =============== ==========

Apr 24 '07 #3

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

Similar topics

11
3143
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the current entries for that page, and adds a new entry with some information regarding the current...
3
2081
by: Karl Hungus | last post by:
A cs file I compiled into an assembly dll is in my bin directory. In the cs file I have a using statement for System.Xml I compiled it using this command: csc /out:XmlContent.dll /t:library XmlContent.cs When I run my aspx page, which has a codebehind that instantiates the object from in my assembly, I get the following error, anyone know why? File or assembly name System.Xml, or one of its dependencies, was not found.
37
5996
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes in a separate file from the HTML. Apart from the obvious advantage if you have a separate designer and programmer, are there any other advantages to code behind? Most of the stuff I've seen so far uses code inside, but that's probably
7
3130
by: Steve Richter | last post by:
I am attempting to use the IBM DB2Connection class in my .aspx web page. Using Visual Web Developer 2005 express, I cant figure out how to add a reference to a project. heck, I cant figure out how to open a project! so I am trying to use the @assembly directive to point directly to the assembly .DLL that contains the DB2 namespace:
18
3802
by: Praveen Ramesh | last post by:
Hi, Is there any way to add the @Assembly reference to the aspx files programmatically from inside a custom control (when it gets dropped on to the page from the toolbox)? I have a custom control - MyControl that implements an interface in another custom assembly - InterfaceAssembly. When MyControl gets dropped on to the page and run, it results in a "InterfaceAssembly not found" exception. I am aware that this can be fixed by...
3
5254
by: Jim | last post by:
Hi, I have an assembly and it's satellite in my GAC. I have referenced the DLLs in my project (from the same location where I added it to the GAC). CopyLocal is set false. When I run the project I get our old friend: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error
6
3835
by: ewolfman | last post by:
Hi, I've read many posts in several news groups, but can't figure out how to publish my website. The specific error I'm getting (on the "successfully published website") is "Could not load the assembly 'App_Web_vxfyglsm'. Make sure that it is compiled before accessing the page". I checked - The assembly DOES exist in the target web folder.
4
6048
by: Mythran | last post by:
We have more than one version of an assembly that contains web controls installed in the GAC. In our application, we want to always reference the most recent version of the assembly WITHOUT manually changing the version numbers in the .aspx files (<% Register TagPrefix... lines). I can manually remove the version information from the aspx files and all is well. It seems to be using the most recent version just fine. One problem is, if...
5
3014
by: daveh551 | last post by:
What, from a high level point of view, is the difference (in Visual Studio 2005) between Website (accessed with Open Website or Create Website from the StartPage) that is an ASP.NET Website, and a Project that is created with the "ASP.NET Application" template? I see some obvious differences: the Project creates the working folder under the Visual Studio 2005\Projects directory, while the Website creates it in the Inetpub\wwwroot...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2993
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.