By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,016 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,016 IT Pros & Developers. It's quick & easy.

Custom Control Referencing Global.asax --- Possible?

P: n/a
Ron
I need to write a custom textbox control that references an object located
in the Global.asax class, but I can't compile the control into a DLL without
including the reference to the project DLL that includes the Global.asax
assembly.

I've tried reflection, but I can't seem to make it work correctly.

Does anyone have any ideas how I can make this happen?

Thanks,

Ron

--
--------------------------------------------------------------
Ron Rodenberg
Lead Software Engineer
Razorvision Technology
8080 N. Central Expressway
Suite 400
Dallas, TX 75206
Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
To avoid circular references in your project, you can expose a
property in the custom control to be set at runtime with the reference
to the global object.

On Sat, 18 Oct 2003 18:00:24 -0500, "Ron" <ro*@razorvision.net> wrote:
I need to write a custom textbox control that references an object located
in the Global.asax class, but I can't compile the control into a DLL without
including the reference to the project DLL that includes the Global.asax
assembly.

I've tried reflection, but I can't seem to make it work correctly.

Does anyone have any ideas how I can make this happen?

Thanks,

Ron


Nov 17 '05 #2

P: n/a
Ron
Yea thats what I am trying to do, unfortunately the DLL will not compile
without having the "/reference: AppName.dll" reference (the assembly is
needed so that the compiler will know that the Global class exists.
Unfortunately, I can't add the resulting assembly into my project because of
the dual reference.

I need to reference an object in a different assembly without explicitly
referencing the assembly at compile time.

Any ideas?

--
--------------------------------------------------------------
Ron Rodenberg
Lead Software Engineer
Razorvision Technology
8080 N. Central Expressway
Suite 400
Dallas, TX 75206
"Juan Wajnerman" <wa*@arnet.com.ar> wrote in message
news:qi********************************@4ax.com...
To avoid circular references in your project, you can expose a
property in the custom control to be set at runtime with the reference
to the global object.

On Sat, 18 Oct 2003 18:00:24 -0500, "Ron" <ro*@razorvision.net> wrote:
I need to write a custom textbox control that references an object locatedin the Global.asax class, but I can't compile the control into a DLL withoutincluding the reference to the project DLL that includes the Global.asax
assembly.

I've tried reflection, but I can't seem to make it work correctly.

Does anyone have any ideas how I can make this happen?

Thanks,

Ron

Nov 17 '05 #3

P: n/a
"Ron" <ro*@razorvision.net> wrote in message
news:bm********@library1.airnews.net...
Yea thats what I am trying to do, unfortunately the DLL will not compile
without having the "/reference: AppName.dll" reference (the assembly is
needed so that the compiler will know that the Global class exists.
Unfortunately, I can't add the resulting assembly into my project because of the dual reference.

I need to reference an object in a different assembly without explicitly
referencing the assembly at compile time.


No. You need to reference a type in a different assembly without explicitly
referencing the assembly at compile time.

Which is impossible, since the assembly is where it's going to get the type
from!

Since this type needs to be referenced by at least two assemblies, you
should assume that it will eventually need to be referenced by more than
two. Put it in a library. Create a separate class library project and define
the type there. Reference the new project both from your global.asax and
from your control.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #4

P: n/a
"Ron" <ro*@razorvision.net> wrote in message
news:bm********@library1.airnews.net...
Yea thats what I am trying to do, unfortunately the DLL will not compile
without having the "/reference: AppName.dll" reference (the assembly is
needed so that the compiler will know that the Global class exists.
Unfortunately, I can't add the resulting assembly into my project because of the dual reference.

I need to reference an object in a different assembly without explicitly
referencing the assembly at compile time.


No. You need to reference a type in a different assembly without explicitly
referencing the assembly at compile time.

Which is impossible, since the assembly is where it's going to get the type
from!

Since this type needs to be referenced by at least two assemblies, you
should assume that it will eventually need to be referenced by more than
two. Put it in a library. Create a separate class library project and define
the type there. Reference the new project both from your global.asax and
from your control.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.