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

cannot access class?

I have a custom (derived) Page class called BasePage where I define a class
called ImgLink and it has a public constructor:

public class ImgLink{ publicImgLink(params...)}

From the Masterpage I instantiate a BasePage class to access the ImgLink
class as:

BasePage _basePage = (BasePage) this.Page;
Still, I cannot access the _basePage.ImgLink class... why is that?
Apr 7 '06 #1
1 1465

"Daves" wrote...
I have a custom (derived) Page class called BasePage where I
define a class called ImgLink and it has a public constructor:

public class ImgLink{ publicImgLink(params...)}
Do you define this *inside* your BasePage class?

Then it's an "inner class", not a method or field of the class, but a class
by itself...
From the Masterpage I instantiate a BasePage class to
access the ImgLink class as:

BasePage _basePage = (BasePage) this.Page;

Still, I cannot access the _basePage.ImgLink class...
why is that?


Because of what I wrote above, it's not accessible through an instance of
the class, but through the class itself:

BasePage.ImgLink x = new BasePage.ImgLink(...);

// Bjorn A

Apr 7 '06 #2

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

Similar topics

2
by: Chris Herring | last post by:
Hi there: Well, let me start off by saying that I am a Visual Studio drag and drop weenie, not a real programmer. So I tend to get confused when things do not look like the instructions said they...
9
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
1
by: Thomas Barnet-Lamb | last post by:
I was wondering if anyone could give me some help with the following. Consider the code snippet: struct qqq{typedef qqq* pointer;}; template<class al> struct foo : public al { template...
1
by: Yuan Ze | last post by:
The compiler can not compile the code boxing/unboxing value types declared in a MG C++ class. It reports compiler error 2248, 'member' : cannot access member declared in class 'class'. To use a...
3
by: POL8985 | last post by:
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection...
2
by: TJO | last post by:
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...
2
by: Vincent RICHOMME | last post by:
Hi, I still have problems with some class and their members. I have two classes declared as : typedef struct tagStructB { int iSizeB; char* szTextB;
3
blazedaces
by: blazedaces | last post by:
Hello, it's been a while since I posted on these forums. My issue I think isn't as much in my code as it's in the syntax and structure in references other packages. I'll get straight to it then: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.