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

Accessing "Resources" from class libraries

Hi gang,

I'm loving the new Resource features in Whitbey. No longer are there
any Button1.Text = "Click Here" lines in my code-behinds. All have
been replaced with Resources.Labels.ClickHere (Our site is in 3
languages).

But, is there a way to access the Resources namespace from another
class library? I've searched all through the HttpContext class for a
mention of it but no luck.

Thanks,
Roger

Nov 19 '05 #1
2 1160
Have a look @ System.Resources namspace

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"Roger Helliwell" <rh********@telus.net> wrote in message
news:nf********************************@4ax.com...
Hi gang,

I'm loving the new Resource features in Whitbey. No longer are there
any Button1.Text = "Click Here" lines in my code-behinds. All have
been replaced with Resources.Labels.ClickHere (Our site is in 3
languages).

But, is there a way to access the Resources namespace from another
class library? I've searched all through the HttpContext class for a
mention of it but no luck.

Thanks,
Roger

Nov 19 '05 #2
On Sun, 30 Jan 2005 15:50:45 +0100 in
microsoft.public.dotnet.framework.aspnet, "Daniel
Fisher\(lennybacon\)" <info@(removethis)lennybacon.com> wrote:
Have a look @ System.Resources namspace


Hi Daniel,

Not sure what I'm after in that namespace. I've looked at
ResourceManager and ResourceSet, but so far no luck. Do I need to
physically load the .resx file using reflection or something similar?

Here's what I know so far...

Each .resx file in /Application_GlobalResources is translated to a
static class within the "Resources" namespace. So for example,
"Errors.resx" can be accessed using Resources.Errors.SomeErrorCode.
These classes exist in the web-application code space, so how can an
external class reference them without adding a reference?

Any further thoughts?

Roger

Nov 19 '05 #3

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

Similar topics

0
by: camaro77 majau via DotNetMonster.com | last post by:
Sorry by my english but i'm from spain. I have a problem and after search by the web i have know that is due by framework. The message is : setup error "failed to load ressouces from resource...
2
by: Nurchi BECHED | last post by:
Hello, All My question is, if I add an image to my project and make it embedded resource, how do I access that image (or any other object, down the road) in runtime? Thanks. I appreciate...
12
by: Bonj | last post by:
can you embed a resource into a static libary? I'm using a custom binary resource specified as a .bin file in the .rc file of the static library project I've got. I use FindResource, LoadResource,...
2
by: franzhe | last post by:
Hi all, in a simple ASP.Net application with resources in satellite assemblies I have the following problem: If I set <identity impersonate="true"/>, accessing a culture specific resource...
0
by: John Appleby | last post by:
Hi there, I've been searching high and low for instructions on where to add the command to launch "ResGen.exe" in Visual Studio in order to compile a ".txt" based resources file I've added to my...
16
by: recover | last post by:
#include <string> #include <iostream> using namespace std; class TConst { private: string con; string uncon; public:
3
by: John Torville | last post by:
Hi there, Does anyone know how to add ".txt" resources file to a C# project in Visual Studio. It should compile down to an embedded ".resources" file the same way as a ".resx" file. Thanks.
0
by: svsujeet | last post by:
All, I am trying to find the DLL in windows that has the "Assertion Failed" resource string. Any ideas? Sujeet
25
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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...

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.