473,769 Members | 5,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot Access Base Members when Inheriting WebControl

TJO
I am having difficulty understanding why I cannot access my base .ascx
class members from my inherited class.

I create a base .ascx control and add a method.

public partial class myWebControlBas e : System.Web.UI.U serControl
{
public virtual void _foo(){
}
}
I then create another ascx control by extending the base class:

public partial class ResumeCapture_R esumeCaptureBas e : myWebControlBas e

{

}

the compiler is telling me _foo() does not exists when I access it from
the HTML portion of my control. Nor does itellisense show the method.
Is inheritance of webcontrols handled differently in 2.0 than 1.0 or
1.1?

Mar 15 '06 #1
2 1406
Tj, my first thought is that your base class must reside in the App_Code sub
directory otherwise it won't be accessible...ht h

Jose
"TJO" <Ti**********@g mail.com> wrote in message
news:11******** *************@z 34g2000cwc.goog legroups.com...
I am having difficulty understanding why I cannot access my base .ascx
class members from my inherited class.

I create a base .ascx control and add a method.

public partial class myWebControlBas e : System.Web.UI.U serControl
{
public virtual void _foo(){
}
}
I then create another ascx control by extending the base class:

public partial class ResumeCapture_R esumeCaptureBas e : myWebControlBas e

{

}

the compiler is telling me _foo() does not exists when I access it from
the HTML portion of my control. Nor does itellisense show the method.
Is inheritance of webcontrols handled differently in 2.0 than 1.0 or
1.1?

Mar 15 '06 #2
TJO
Even thought the base class is a base webcontrol?

Mar 16 '06 #3

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

Similar topics

5
3566
by: Allen | last post by:
Hi all, I have a derived class that inherits from two base classes. One of the base class constructors takes as input a pointer that is initialized in the other base class. How can I make sure the base classes are properly initialized with the data they need when I call the derived class' constructor? -- Best wishes,
0
1059
by: source | last post by:
I have a base class called Automobile, and a child class called CAR When I create an object of CAR, it should have all the base class members/fields But when I see the CAR object in quick watch I see bunch of empty lines in my view. Is there anything wrong, why don't I see my base class variables/fields. All of the base class variables and fields are public. Any clue. source
5
20042
by: Dave Veeneman | last post by:
I'm using inheritance more than I used to, and I find myself calling a lot of base class methods. I generally call a base method from a dreived class like this: this.MyMethod(); I'm finding it somewhat confusing when I look at the code later, because I expect to find a method called MyMethod() in the derived class. I think C# would let me call a base class method from a derived class like
7
6625
by: Baski | last post by:
Base class: class AssetBase { string _clli; public string CLLI { get
5
5140
by: Nathan Sokalski | last post by:
When running a page I am working on, I recieve the following error: Cannot use a leading .. to exit above the top directory. I suspect this has something to do with the problem I posted in a recent posting "HyperLink.NavigateUrl always adds an extra ../ when going to a higher level directory" on Sunday, May 29, 2005 7:33 PM However, I cannot be sure because I cannot view the generated code since it gives the error before anything is...
1
831
by: Peter Nofelt | last post by:
Hey All, I am having issue with serializing a class and its base class using ..net 2.0. I am using IXmlSerializable I've provided code displaying my at the bottom of this post. Thanks ahead of time for any help or feedback. Cheers, Peter
1
2232
by: D Witherspoon | last post by:
Coming up with a scenario here. For example there is the standard .NET MailMessage class. I am creating a project (let's call it CommonBase) that has the following 2 classes EmailMessage_Base ( inherits System.Net.Mail.MailMessage and provides additional methods and properties) EmailMessage_Abstract ( inherits EmailMessage_Base and adds some business logic including what default return addresses are and
4
1806
by: Jamie Hankins | last post by:
I'm probably being dense here. In the following situation: class Base { int x; int y; } class Decendant : Base { int z; }
0
1024
by: Steve Richter | last post by:
my composite control does not render correctly the 2nd time it is made visible. When I change the base class from CompositeControl to WebControl, the control works as it should. public class RowPrompt2 : System.Web.UI.WebControls.WebControl, INamingContainer // public class RowPrompt2 : System.Web.UI.WebControls.CompositeControl, INamingContainer { }
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10050
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 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...
1
9999
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,...
0
9866
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 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...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
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
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.