locked
Asp C# .resx resources RRS feed

  • Question

  • User826433927 posted

     Doing a ASP page for mobiles I need to be able to access .resx diractly from code which is in C# (no javascript, mobiles don't like javascript...)

    And yes i NEED to do this in code behind for silly reasons...

     

    Any ideas? 

    Wednesday, April 16, 2008 8:04 AM

Answers

  • User826433927 posted

    Found the solution 

    using System.Resources;
    using System.Globalization;
    using System.Threading;
    
    
    GetLocalResourceObject("YourResourceName").ToString(); 
     
    You just put in the name you give the resource in your resx file [:)] 
     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 12:12 PM

All replies

  • User-525215917 posted
    Using resx files through JavaScript sounds pretty kinky to me because it is server-side topic. To handle resx files just check out what System.Resources namespace can offer you :)
    Wednesday, April 16, 2008 1:39 PM
  • User826433927 posted

    Tryed that, didn't help and by the way ironacly C# is mostly javascript...

     Joy :(

    Wednesday, April 16, 2008 10:39 PM
  • User826433927 posted

    Found the solution 

    using System.Resources;
    using System.Globalization;
    using System.Threading;
    
    
    GetLocalResourceObject("YourResourceName").ToString(); 
     
    You just put in the name you give the resource in your resx file [:)] 
     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 12:12 PM