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. ASP.NET GlobalResources.. Use <%$ or <%= embedded code?

ASP.NET GlobalResources.. Use <%$ or <%= embedded code?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethardwarehelpquestion
2 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.
  • J Offline
    J Offline
    JD86
    wrote on last edited by
    #1

    I'm working on trying to make my website for multiple languages. Based on my reading I am looking at creating a LocalizedText.resx file as the fall-back language (English) when it doesn't detect. Anyways I have to work on replacing all the text to read from this file (or the other languages files). The documentation says use <%$ Resources:LocalizedText, %> but the problem is you can't just put them on a page. You have to use the Text= within a control or Literal. Can I not just do <%= Resources.LocalizedText.mykey %> instead? I would hate to replace ALL text with a control... wouldn't that just increase the viewstate on the page?

    W 1 Reply Last reply
    0
    • J JD86

      I'm working on trying to make my website for multiple languages. Based on my reading I am looking at creating a LocalizedText.resx file as the fall-back language (English) when it doesn't detect. Anyways I have to work on replacing all the text to read from this file (or the other languages files). The documentation says use <%$ Resources:LocalizedText, %> but the problem is you can't just put them on a page. You have to use the Text= within a control or Literal. Can I not just do <%= Resources.LocalizedText.mykey %> instead? I would hate to replace ALL text with a control... wouldn't that just increase the viewstate on the page?

      W Offline
      W Offline
      Wombaticus
      wrote on last edited by
      #2

      Why not try it and see if it works? With regards ViewState, you can set

      EnableViewState="false"

      either for an individual control, or at the page level if you can get away with that.

      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