473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Custom Control Referencing Global.asax --- Possible?

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
4 2264
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
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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ron | last post by:
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...
3
by: Ryan Moore | last post by:
I am trying to "tune" some user controls in ASP.NET for optimal caching. Is it possible to do a vary by param - on a Session Variable, so the page caches when a Session variable stays the same,...
0
by: zorhel | last post by:
Hi ALL, I have the following scenario: a web application (ASP.NET/C#). The connected users would be send messages to another user, the server would be sende message from especific user, the server...
0
by: Ranv | last post by:
Is it possible to use web.config to handle 404 Page Not Found errors, and application level custom errors (in global.asax) to handle all other errors? I suppose I would have to make sure that I...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
1
by: | last post by:
Hi all, Is it possible to have custom function/subroutines in global.asax? e.g. DoMyWork(i as integer) etc etc. If yes, how can I access this code in my ..aspx pages? I know I can put this into...
3
by: Mr Newbie | last post by:
I'm testing error handling configurations and having some trouble. I created a WebForm called. ErrDefault.aspx and I am trying to use the Page error attribute to force the redirection to a custom...
1
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom...
5
by: rote | last post by:
I'm using ASP.NET 2.0 and i have copied and pasted the code below to my Global.asax file but it desn't trap the error I want to trap the 401 access denied void Application_Error(object sender,...
3
by: Peter Larsen [CPH] | last post by:
Hi, I have a problem where the code in Global.asax.cs runs before the unittests (on test of course). In the global file, i load some data from a Oracle table and save it in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.