473,386 Members | 1,795 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,386 software developers and data experts.

How to instantiate a user defined object in page_load()

Hello, friends,

I have an assembly .dll that contains class ExceptionLogger. I need it in
page_load() event of aspx pages as the follows:

Utilities.ExceptionLogger mLogger = new ExceptionLogger();
System.Collections.ArrayList mList = new Array();

However, the first line gave me error, saying:
TypeLoadException: Could not load Utilities.ExceptionLogger from
assembly utilities, version=1.0.2061.34926, Culture=neutral,
PublicKeyToken=null
.............

If I removed the first line, mList would be created without problem. I do
not understand why. What is wrong with the first line?

Any ideas? Help please.

Thanks a lot.

Nov 19 '05 #1
1 1129
To answer your question I need to check the ExceptionLogger class.
You can check whether you are using any type in the Exceptionlogger for
which assembly is not available ? This may be the reason Exception is thrown.
--
Vijayakrishna
Software Architect
"Andrew" wrote:
Hello, friends,

I have an assembly .dll that contains class ExceptionLogger. I need it in
page_load() event of aspx pages as the follows:

Utilities.ExceptionLogger mLogger = new ExceptionLogger();
System.Collections.ArrayList mList = new Array();

However, the first line gave me error, saying:
TypeLoadException: Could not load Utilities.ExceptionLogger from
assembly utilities, version=1.0.2061.34926, Culture=neutral,
PublicKeyToken=null
.............

If I removed the first line, mList would be created without problem. I do
not understand why. What is wrong with the first line?

Any ideas? Help please.

Thanks a lot.

Nov 19 '05 #2

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

Similar topics

6
by: Frank Millman | last post by:
Hi all I have a question regarding inheritance. I have come up with a solution, but it is not very elegant - I am sure there is a more pythonic approach. Assume the following class definitions....
16
by: gabon | last post by:
Due a big project I would like to create different javascript classes and assign them to divs. But how? :) I know the usage of prototype but given that this could be possible: function...
1
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have...
2
by: paul meaney | last post by:
All, myself and another developer have been staring blankly at a screen for the past 48 hours and are wondering just what stunningly obvious thing we are missing. We are trying to load up 2...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
10
by: Davíð Þórisson | last post by:
Please can someone tell me how on earth to create an instance of my top level (base) Page class so that I can access it's objects from an user control?? Someone told me public myParent =...
12
by: Phil Certain | last post by:
Hi, I'm trying to do something very simple...or at least it should be. I have created a host page (gen.aspx) and a very simple user control (us.ascx). The corresponding code-behind files are...
1
by: John Keenan | last post by:
I have a user control with 2 buttons on it & 1 label.... as each button is pressed, they set a member variable within the class and sets the label test. I also have a get/set property for the...
5
by: richard.tallent | last post by:
I'm fond of web controls in ASP.NET, but the need for <@ Register%> blocks at the top of each page is a pain. ASP.NET 2.0 has a way to centrally register controls in the web.config file, but it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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,...
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...

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.