472,981 Members | 1,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,981 software developers and data experts.

Localisation with RESOURCE: in aspx pages need resx files no dll

WT
Hello,

Could we use 'Embedded resources' with resx files that contain text
resources used in aspx pages with the syntaxe:
Text="<%$ Resources:ResourcesMy,KEY1 %>"

I tryed removing the App_GlobalResources folder, and after verifying thta my
resources were correctly embedded in my dll, I get errors as if asp.net was
unable to look for these ressources in the assembly, still trying to open an
resx file

InitializeDataSourceLoadControl controlPath :
/WTPageModules/Pages/PortalPagesManager.ascx, ex :
System.Web.HttpParseException: The resource object with key 'AM_TABS' was
not found. --->
System.Exception: The resource object with key 'AM_TABS' was not found. --->
System.Web.HttpException: The resource object with key 'AM_TABS' was not
found.

Is there any solution to have dlls and no resx files deployed ?

Thanks

CS
Apr 30 '07 #1
2 10688
Hi CS,

From your description, what you want to do is using the localization
resources defined in a class library assembly(rather than the
App_LocalResource or App_GlobalResource) in your ASP.NET 2.0 page, correct?

Based on my understanding, ASP.NET 2.0 web page's localization directive
(<%$Resource %>) can only reference resource items defined in either
App_LocalResource or App_GlobalResource's resource files. To use resource
items in a separate .net assembly, you may need to manually load the
resource through resource API(such as resourceManager ...)

http://msdn2.microsoft.com/en-us/lib...03(VS.71).aspx

Also, for ASP.NET 2.0 application, if you perform precompilation for your
web application, those resource files in App_GlobalResource and
App_LocalResource can be precompiled into assemblies. Is this possible to
help avoid using separate assembly to store resource?

In addition, if you do have to store resource in class library, you can
consider create a custom expression build that encapsulate the code logic
of retrieving resource from external resource file or assembly and use your
custom expression in ASPX template. here is a msdn article introducing this:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

And another good article about custom expression builder in ASP.NET 2.0:

#The CodeExpressionBuilder
http://weblogs.asp.net/infinitiesloo...odeExpressionB
uilder.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 1 '07 #2
WT
Yes, thats what I was looking for, thanks.
CS
"Steven Cheng[MSFT]" <st*****@online.microsoft.coma écrit dans le message
de news: EC**************@TK2MSFTNGHUB02.phx.gbl...
Hi CS,

From your description, what you want to do is using the localization
resources defined in a class library assembly(rather than the
App_LocalResource or App_GlobalResource) in your ASP.NET 2.0 page,
correct?

Based on my understanding, ASP.NET 2.0 web page's localization directive
(<%$Resource %>) can only reference resource items defined in either
App_LocalResource or App_GlobalResource's resource files. To use resource
items in a separate .net assembly, you may need to manually load the
resource through resource API(such as resourceManager ...)

http://msdn2.microsoft.com/en-us/lib...03(VS.71).aspx

Also, for ASP.NET 2.0 application, if you perform precompilation for your
web application, those resource files in App_GlobalResource and
App_LocalResource can be precompiled into assemblies. Is this possible to
help avoid using separate assembly to store resource?

In addition, if you do have to store resource in class library, you can
consider create a custom expression build that encapsulate the code logic
of retrieving resource from external resource file or assembly and use
your
custom expression in ASPX template. here is a msdn article introducing
this:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

And another good article about custom expression builder in ASP.NET 2.0:

#The CodeExpressionBuilder
http://weblogs.asp.net/infinitiesloo...odeExpressionB
uilder.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

May 2 '07 #3

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

Similar topics

1
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ...
1
by: LidorP | last post by:
Hello All, My problem is as follows: I have an assembly which holds a number of WebForms. In order to use these WebForms in my WebApplication i have to extract them out of the assembly (using...
2
by: JollyK | last post by:
Hello friends, In a large asp.net project, I don't think it is a good idea for having one common resource file containing all localized strings for the whole application. I think a better...
2
by: Fredrik Rodin | last post by:
All, I'm having problems with my resource manager in ASP.NET 2.0 after conversion from ASP.NET 1.1. Here is a background: In ASP.NET 1.1 All my user controls and aspx pages inherit from...
1
by: Griff | last post by:
In my web.config file, I have the following: <globalization culture="auto:en-gb" uiCulture="auto:en-gb"/> In my Web.sitemap file, I have the following <siteMap...
1
by: vecozo | last post by:
Centralized resource files Hi, We are considering to migrate our custom asp.net localization procedure, to one that stored .Text properties of controls in a SQL database, towards the usage of...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
5
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, I've created a class library assembly containing several string resource files, like: - TableColumns.resx - TableColumns.de.resx - General.resx - General.de.resx
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.