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. How to use Resource.resx file in my soution.

How to use Resource.resx file in my soution.

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netvisual-studiobusinesstutorial
3 Posts 3 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.
  • S Offline
    S Offline
    Sasmi
    wrote on last edited by
    #1

    Dear Friends, Actually this is my first project in which i create an ASP.net web site i want some global data which i stored in Resource.resx file and i create solution for some business logic now each time i have to pass the Resource.resx file data to solution at any page or button event can it is possible to access the resource file of that web site from the soution itself so it could be centralise at solution level. [Solution (Bussiness Logic)] - [Resource File (Centralise Info)] - [Web page (Front End)] is this a good idea or i thinking something which is not possible. i am using Microsoft Visual Studio 2005 (Framework 2.0) Thanks in advance:cool: Sasmi

    P J 2 Replies Last reply
    0
    • S Sasmi

      Dear Friends, Actually this is my first project in which i create an ASP.net web site i want some global data which i stored in Resource.resx file and i create solution for some business logic now each time i have to pass the Resource.resx file data to solution at any page or button event can it is possible to access the resource file of that web site from the soution itself so it could be centralise at solution level. [Solution (Bussiness Logic)] - [Resource File (Centralise Info)] - [Web page (Front End)] is this a good idea or i thinking something which is not possible. i am using Microsoft Visual Studio 2005 (Framework 2.0) Thanks in advance:cool: Sasmi

      P Offline
      P Offline
      Preyatham
      wrote on last edited by
      #2

      i dont know how did you store the global data in resx file. As per my knowledge resx file is automatically created for an aspx and it only holds the data of the page. I dont know how to call resx file in the code but i have a suggestion...Dont make the code too complicated..if you want the global data to be stored then create a separate class...while deploying use x copy deployment where you only use dll...hope this will help you...

      bzinez

      1 Reply Last reply
      0
      • S Sasmi

        Dear Friends, Actually this is my first project in which i create an ASP.net web site i want some global data which i stored in Resource.resx file and i create solution for some business logic now each time i have to pass the Resource.resx file data to solution at any page or button event can it is possible to access the resource file of that web site from the soution itself so it could be centralise at solution level. [Solution (Bussiness Logic)] - [Resource File (Centralise Info)] - [Web page (Front End)] is this a good idea or i thinking something which is not possible. i am using Microsoft Visual Studio 2005 (Framework 2.0) Thanks in advance:cool: Sasmi

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        It's always a good practice to keep the string values which is common to the application in a assembly resource file. In Framework 2.0, accessing the named strings from assembly resource file has been made very simpler. You have to add the resource file to the App_GlobalResources folder and add the named strings to the resource file. Say for an example, you have added a resource file with the name GlobalData.resx and a string ApplicationName with the value "Sample Application". The named strings you add to a global resource file are accessible through a namespace named Resources. It takes a single line of code...

        lblAppName.Text = Resources.GlobalData.ApplicationName

        - Regards -
           J O N


        A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers


        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