473,776 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple question : reference vs Register ????

Dear all,

I do not see the difference between Referencing an assembliy for use in my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to add a
reference no ?
Nov 21 '05 #1
5 2465
Serge:
I somewhat answered in your other post.

You can register an assembly without first referecing it. However, you can
make use of only a referenced assembly. To use System.String, you must
reference the System.dll assembly. To use <asp:literal you must both
reference the System.Web.dll AND register the System.Web.UI.W ebControls
namespace.

In your context, registering is specific to using controls on the page.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:92******** *************** ***********@mic rosoft.com...
Dear all,

I do not see the difference between Referencing an assembliy for use in my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to add
a
reference no ?

Nov 21 '05 #2
Would it be accurate to say that to register a control is to basicly declare
it in the template for the page which is used to construct the page object,
whereas to add a reference to an assembly is to make it available to the
whole project.??

--
Best Regards

The Inimitable Mr Newbie º¿º
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uG******** ********@TK2MSF TNGP11.phx.gbl. ..
Serge:
I somewhat answered in your other post.

You can register an assembly without first referecing it. However, you
can make use of only a referenced assembly. To use System.String, you
must reference the System.dll assembly. To use <asp:literal you must
both reference the System.Web.dll AND register the
System.Web.UI.W ebControls namespace.

In your context, registering is specific to using controls on the page.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:92******** *************** ***********@mic rosoft.com...
Dear all,

I do not see the difference between Referencing an assembliy for use in
my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to
add a
reference no ?


Nov 21 '05 #3
Not sure that your definition of register is 100% clear to me :)

First, you can register a user control, in which case you are registering a
specific control. But you can also register a namespace/assembly, in which
you'll likely register multiple controls.

To me, registering is the association of a tagprefix with a control. When
using the Src attribute, you are registering 1 particular control. When
using the Namespace/Assembly attributes, you are associating all controls
within the namespace/assembly to the tagprefix.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Mr Newbie" <he**@now.com > wrote in message
news:eC******** ******@tk2msftn gp13.phx.gbl...
Would it be accurate to say that to register a control is to basicly
declare it in the template for the page which is used to construct the
page object, whereas to add a reference to an assembly is to make it
available to the whole project.??

--
Best Regards

The Inimitable Mr Newbie º¿º
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uG******** ********@TK2MSF TNGP11.phx.gbl. ..
Serge:
I somewhat answered in your other post.

You can register an assembly without first referecing it. However, you
can make use of only a referenced assembly. To use System.String, you
must reference the System.dll assembly. To use <asp:literal you must
both reference the System.Web.dll AND register the
System.Web.UI.W ebControls namespace.

In your context, registering is specific to using controls on the page.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:92******** *************** ***********@mic rosoft.com...
Dear all,

I do not see the difference between Referencing an assembliy for use in
my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to
add a
reference no ?



Nov 21 '05 #4
in asp.net 1.1 there are two types of compiles done.

one is for the codebehind done the VS2003. if you add a reference to a
project, when the codebehind pages are compiled, the project references are
sent to the compiler.

the other is the compile of the individual pages done at runtime by asp.net,
these have no knowledge of the project references, so if you need to
reference a dll in aspx page, you need to add the reference via the register
directive.

in version 2, vs2005 uses the asp.net compiler for both pages and
codebehind. when you add a reference, vs adds refenece to the web config, so
it seen by all compiles.

you could just add the reference to the page, and not the web config, then
only the pages that use the reference compile with it. minor performance
gain in startup.

-- bruce (sqlwork.com)

"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:92******** *************** ***********@mic rosoft.com...
Dear all,

I do not see the difference between Referencing an assembliy for use in my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to add
a
reference no ?

Nov 21 '05 #5
OK thanks,

I understand that. This is realy a declaration within the scope of the page
though right ?
whereas when adding a reference to the project you are making the referenced
assembly available to the whole project, that was really my attempt at
trying to write out my understanding of it.

--
Best Regards

The Inimitable Mr Newbie º¿º

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:e7******** ******@tk2msftn gp13.phx.gbl...
Not sure that your definition of register is 100% clear to me :)

First, you can register a user control, in which case you are registering
a specific control. But you can also register a namespace/assembly, in
which you'll likely register multiple controls.

To me, registering is the association of a tagprefix with a control. When
using the Src attribute, you are registering 1 particular control. When
using the Namespace/Assembly attributes, you are associating all controls
within the namespace/assembly to the tagprefix.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Mr Newbie" <he**@now.com > wrote in message
news:eC******** ******@tk2msftn gp13.phx.gbl...
Would it be accurate to say that to register a control is to basicly
declare it in the template for the page which is used to construct the
page object, whereas to add a reference to an assembly is to make it
available to the whole project.??

--
Best Regards

The Inimitable Mr Newbie º¿º
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uG******** ********@TK2MSF TNGP11.phx.gbl. ..
Serge:
I somewhat answered in your other post.

You can register an assembly without first referecing it. However, you
can make use of only a referenced assembly. To use System.String, you
must reference the System.dll assembly. To use <asp:literal you must
both reference the System.Web.dll AND register the
System.Web.UI.W ebControls namespace.

In your context, registering is specific to using controls on the page.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:92******** *************** ***********@mic rosoft.com...
Dear all,

I do not see the difference between Referencing an assembliy for use in
my
project and Register it on a page ?

At the end if I want to use assembly functionnality , I need anyway to
add a
reference no ?



Nov 21 '05 #6

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

Similar topics

7
6013
by: Tim Clacy | last post by:
I know arrays of references are not allowed, but have a couple of questions: 1) Why aren't arrays of references allowed :-) ? 2) What's a good practical alternative? As an example, Intel's PXA255 processor's DMA controller has 16 consecutive registers for DMA channel control & status called DCSRx. It would be nice to have a short-hand access to these registers in addition to indirect access
11
2714
by: JKop | last post by:
Take the following simple function: unsigned long Plus5Percent(unsigned long input) { return ( input + input / 20 ); } Do yous ever consider the possibly more efficent:
4
6322
by: Ville Ahonen | last post by:
I'm just learning C++ and thought I'd program a simple screensaver in VC++ as my first assignment. I've found some tutorials showing how to create a screenasver using OpenGL, but I found it very confusing and perhaps uunnecessarily complex for my needs. What I would like to do is 1) know the dimensions of the screen (eg. 1024x768x32bit) 2) be able to use some sort of framebuffering, i.e. drawing to one frame while showing the other to...
0
1478
by: samsonfr | last post by:
Hello, I have read KB 814472 and the article "How To: Remove Dependency on _vcclrit.h" (http://msdn2.microsoft.com/en-us/library/ms173267(en-us,vs.80).aspx) which confirmed that VS.NET 2005 don't need the "/noentry + MSVCRT.LIB + __DllMainCRTStartup@12 + __crt_dll_initialize, and __crt_dll_terminate" fix anymore ... I used the article "How to: Compile MFC and ATL Code with /clr"
9
2179
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a usercontrol and all i'm really needing to do is get the selected value when the button is clicked on the form. Can someone tell what I need to include in my page to get this working ? Moe <><
1
1025
by: Radu | last post by:
Hi. I have a class "MyCustomBoundColumn.vb" which looks like this ____________________________________________________________________ Imports System Imports System.Web.UI.WebControls Namespace Alex Public Class MyCustomBoundColumn Inherits BoundColumn .............................
4
4642
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, Until now I was programing for more that 6 years using VB.net simply because I come from that word and used to. Now I need to switch to C# simply because my customer want its project in that language. So now I am fighting with so simple thing like raising a simple event as follow, and have a complie error, with no damn idea what this compiler want. The code is as follow
1
1518
by: ravilolam | last post by:
Hi guys Ravikumar here This is the erro iam not able to rectify, can any body help me for this. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error:
31
3232
by: siddhu | last post by:
why can't we have array of references.
0
9627
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
9462
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10119
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
10060
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
6721
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5492
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4030
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
2
3621
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.