Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...how to access global resx file  in .ascx pagehow to access global resx file in .ascx page
Previous
 
Next
New Post
11/21/2007 8:08 AM
 

Hi there,

 

I added my own global resource file in DNN under app_globalresources directory and named it "myresources.resx". Now it's possible to access it from code behind file using statement like

 

 

Localization.GetString("strOK", Localization.ApplicationResourceDirectory + "/myresources.resx");

but how do i accomplish the same thing from .ascx page so that i don't have to hard code this stuff in .cs file for every single resource item on the page.

thanks

Asif

 
New Post
11/21/2007 8:47 AM
 

you are not supposed to add global resource files, instead use a shared resource file for your module. See UserDefinedTable for example.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/21/2007 8:48 AM
 

even if it is unsexy to read manuals, I would like to point you to the Module Developer Localization Guide available from Documentation page in Resources menu above.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/25/2007 4:35 PM
 

PortalModuleBase contains a property named LocalResourceFile. I use that when I need to access the resources

DotNetNuke.Services.Localization.Localization.GetString("AddContent.Action", this.LocalResourceFile)

If your control is named "vasea.ascx" then your resx file should be "vasea.ascx.resx" inside AppLocalResources folder.


Regards, Ion
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...how to access global resx file  in .ascx pagehow to access global resx file in .ascx page


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out