Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

calling 'GetLocalResourceObject' from a nested class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ANeelima - 03 Dec 2007 15:40 GMT
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.
Signature

ANeelima

Random - 04 Dec 2007 01:01 GMT
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

>I am using C# and I created an .aspx page and the corresponding .aspx.cs
>code
[quoted text clipped - 24 lines]
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.