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 4 2275
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*@razorvisio n.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
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.c om... 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*@razorvisio n.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
"Ron" <ro*@razorvisio n.net> wrote in message
news:bm******** @library1.airne ws.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***********@s urfcontrol.com
"Ron" <ro*@razorvisio n.net> wrote in message
news:bm******** @library1.airne ws.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***********@s urfcontrol.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 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,
|
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, but refreshes when the
session changes?
thnx
|
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 would be redirect especific
user to especific page.
So, I moved to this company two days ago, and receive the following sample
code.
1. A Web Application with:
- main.html (3 framesets)
-- 1# frame - client.html
|
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 don't call
Context.ClearError(); when a 404 Error occurs, but how do I check in
code that this has occured?
What I have right now in global.asax is:
protected void Application_Error(object sender, EventArgs e)
{
|
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 (the oleDBConnection on global.asa.vb) at the other aspx
pages ?
| |
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 a seperate dll in the bin directory,
but to keep it simple global.asax would be nice too..
TIA!
|
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 page, but I only get and
unhandled exception page and it does not direct me to my specific page. I'm
probably doing something really stupid, but I cant see what .
Any Ideas ? - Thanx Mr N
--------- DETAILS BELOW -----------
|
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 soap header called by using a http
module. The problem Im having is I cannot seem to get the event to raise to
fire off my authenticate method in the global.asax. The module is plumbed in
to my web.config file
Code Below:-
|
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, EventArgs e)
{
Exception exception = Server.GetLastError();
|
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
HttpApplicationState. This is happening in the Application_start function.
The following unittest show the beginning of the method, where the database
mock is created. If this mock isn't created, the unittest will try to access
|
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...
| |
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...
|
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,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |