Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. App_LocalResources not working with folders.

App_LocalResources not working with folders.

Scheduled Pinned Locked Moved ASP.NET
csharphelphtmlasp-netsysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udikantz
    wrote on last edited by
    #1

    hey, cant find how to solve this thing, i have a test project with the following directory structure: /root/pages/default.aspx /root/App_LocalResources/default.aspx.resx /root/App_LocalResources/default.aspx.fr.resx using the following simple code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestLocale._Default" UICulture="auto:en-US" Culture="auto:en-US"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Label" meta:resourceKey="Label1"></asp:Label> </div> </form> </body> </html> at the resx file i have simple mapping for Label1.Text , The problem: for ssome reason ASP.NET can't find local resources when my default page is not at the root folder in the project, when i place the default.aspx in the root project the localization works, when i place the default.aspx inside a folder it doesnt work i have been searching everywhere and couldnt find how to make it work when using folders. any kind of help would help! thank you.

    Net

    U 1 Reply Last reply
    0
    • U udikantz

      hey, cant find how to solve this thing, i have a test project with the following directory structure: /root/pages/default.aspx /root/App_LocalResources/default.aspx.resx /root/App_LocalResources/default.aspx.fr.resx using the following simple code: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestLocale._Default" UICulture="auto:en-US" Culture="auto:en-US"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Label" meta:resourceKey="Label1"></asp:Label> </div> </form> </body> </html> at the resx file i have simple mapping for Label1.Text , The problem: for ssome reason ASP.NET can't find local resources when my default page is not at the root folder in the project, when i place the default.aspx in the root project the localization works, when i place the default.aspx inside a folder it doesnt work i have been searching everywhere and couldnt find how to make it work when using folders. any kind of help would help! thank you.

      Net

      U Offline
      U Offline
      udikantz
      wrote on last edited by
      #2

      help please

      Net

      M 1 Reply Last reply
      0
      • U udikantz

        help please

        Net

        M Offline
        M Offline
        Martin Jarvis
        wrote on last edited by
        #3

        The App_LocalResources folder needs to be in same folder as the aspx file. /root/pages/App_LocalResources/Default.aspx.resx /root/pages/Default.aspx Hope this helps Martin

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups