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

calling 'GetLocalResourceObject' from a nested class

I am using C# and I created an .aspx page and the corresponding .aspx.cs code
behind file. In the code behind file I have the following class structure

public partial class myclass : page
{

private class nestedclass : myclass
{
public string getResourceString()
{

}
}
}

The nested class has a publi method which attempts to call
'GetLocalResourceObject' and passes in the resource key. When I call
'GetLocalResourceObject' from the nested class, it does not work and throws
me the following error:

"Object reference not set to an instance of an object."

But, when I call the method from the main class itself (myclass), it works
fine. So, how can I call localization methods from a nested class??

Thanks.
--
ANeelima
Dec 3 '07 #1
1 6107
I'm not sure if it will help with your problem, but I have come across
several people with issues when it comes to doing anything beyond the basic
with embedded resources. The following article (and code) helped me
understand the issues better, and resolved my problem at the time.

http://msdn2.microsoft.com/en-us/library/aa302284.aspx

"ANeelima" <ne*****@newsgroups.nospamwrote in message
news:34**********************************@microsof t.com...
>I am using C# and I created an .aspx page and the corresponding .aspx.cs
code
behind file. In the code behind file I have the following class structure

public partial class myclass : page
{

private class nestedclass : myclass
{
public string getResourceString()
{

}
}
}

The nested class has a publi method which attempts to call
'GetLocalResourceObject' and passes in the resource key. When I call
'GetLocalResourceObject' from the nested class, it does not work and
throws
me the following error:

"Object reference not set to an instance of an object."

But, when I call the method from the main class itself (myclass), it works
fine. So, how can I call localization methods from a nested class??

Thanks.
--
ANeelima

Dec 4 '07 #2

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

Similar topics

3
by: Erik Bongers | last post by:
Hi, Nested classes only seem to be able to access static members of the surrounding class : class SurroundingClass { public: class InnerClass { public:
6
by: Asfand Yar Qazi | last post by:
Hi, Consider this: class C { int j; public: C(int i) : j(i)
0
by: Leslaw Bieniasz | last post by:
Cracow, 16.09.2004 Hi, I have a problem with compiling the following construction involving cross-calls of class template methods, with additional inheritance. I want to have three class...
6
by: B0nj | last post by:
I've got a class in which I want to implement a property that operates like an indexer, for the various colors associated with the class. For instance, I want to be able to do 'set' operations...
8
by: Robert W. | last post by:
I've almost completed building a Model-View-Controller but have run into a snag. When an event is fired on a form control I want to automatically updated the "connnected" property in the Model. ...
1
by: Tomas Sieger | last post by:
Hi all, I'm in doubt with the following code: class Base { public: class Nested {}; }; class Derived:public Base { public: class Nested {
1
by: John Baima | last post by:
I am trying to make a template out of a Master Page + some other things and I wanted to localize everything so I used the Tools | Generate Local Resource command. That removed some of the text, but...
3
by: jdurancomas | last post by:
Dear all, I'm trying to declare the operator++ to a nested class. The nested class is not template but the container it is. The code used in teh sample program is included bellow: ...
20
by: d.s. | last post by:
I've got an app with two classes, and one class (InventoryInfoClass) is an object within the other class (InventoryItem). I'm running into problems with trying to access (get/set) a private...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.