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

Why do I need to reference a user control's base class?

Hi!
I have made a user control called, say "MyUserCtrl", which is inherited from
another user defined class called, say "MyBaseClass". Each one of these two
are developed in its own project.

The question: When I use MyUserCtrl in a form, I must, from the form, make
reference to both classes, i.e. even to "MyBaseClass". Otherwise, it will not
work. How can I manage to skip referencing MyBaseClass? I tried to put both
user controls in one and the same project, but I got circular reference error.

Regards
M Shafaat
Nov 17 '05 #1
1 1915
If you have 2 libraries that contain functionality you need in your
project, you cannot skip referencing both libraries.

You might want to further explore putting both controls (MyUserCtrl and
MyBaseClass) in the same project. I do not understand how that would
create a circular reference problem. The controls class should stand
alone (not depend on any of your custom projects), and then the forms
project would reference the controls project. Nothing circular there.
M Shafaat wrote:
Hi!
I have made a user control called, say "MyUserCtrl", which is inherited from
another user defined class called, say "MyBaseClass". Each one of these two
are developed in its own project.

The question: When I use MyUserCtrl in a form, I must, from the form, make
reference to both classes, i.e. even to "MyBaseClass". Otherwise, it will not
work. How can I manage to skip referencing MyBaseClass? I tried to put both
user controls in one and the same project, but I got circular reference error.

Regards
M Shafaat

Nov 17 '05 #2

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

Similar topics

2
by: DC Gringo | last post by:
I have a user control that is reused in 5 .aspx pages and references a variable called "theSection" which is set in the class for each .aspx page. If I only had one .aspx page, I would reference...
15
by: Tee | last post by:
Hi, I have a base usercontrol with a method (blank method, no code), I have another few usercontrols that will inherit this base usercontrol, but I want to force all the usercontrol that...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
1
by: ABC | last post by:
I write a Base Web User Control which contains several public properties and a Inherited Web User Control which only have some codes in new method. When I use the Inherited Web User Control on Web...
1
by: balystyk | last post by:
Are there any possible issues with creating a base class (adding common properties) for a user control using a class file and not a user control (.ascx and code-behind) in asp.net 2.0? I have...
4
by: Brie_Manakul | last post by:
I need to set up an if else to show different weather scripts based on the city selection they choose. Any help on this would be great. Thanks! <%@ page language="java" import="java.util.*,...
8
by: Brett Romero | last post by:
I have this situation: myEXE <needs< DerivedClass <which needs< BaseClass Meaning, myEXE is using a type defined in DerivedClass, which inherits from BaseClass. I include a reference to...
1
by: Charlie | last post by:
Hi: I'm trying to pass a reference to a user control to a class. The user control exposes its elements via properties. When I inspect parameter (user control is passed to class using "this") I...
35
by: Chris | last post by:
Hi, I tried to create a class which must change the propety 'visible' of a <linktag in the masterpage into 'false' when the user is logged. But i get the error: "Object reference not set to an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.