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. Doubt about resource files

Doubt about resource files

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestionvisual-studiobusiness
6 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.
  • H Offline
    H Offline
    hogan smith
    wrote on last edited by
    #1

    Hi All, I am using C#.2005. I created a resource file in business layer to store messages for users. As per you know, visual studio automatically created a class for this resource file and properties for each string. So I can access each string by typing [class name].[property name]. The problem is that these properties are declared with the keyword 'internal'. So I can access it only in the business layer. To access these properties in presentation layer, I changed the scope to public. Now I can access the properties also from presentation layer. But there is hundreds of string in this resource file. So it is difficult to modify each property. How can I overcome this problem? Please help me. Thanks & Regards, Hogan

    C 1 Reply Last reply
    0
    • H hogan smith

      Hi All, I am using C#.2005. I created a resource file in business layer to store messages for users. As per you know, visual studio automatically created a class for this resource file and properties for each string. So I can access each string by typing [class name].[property name]. The problem is that these properties are declared with the keyword 'internal'. So I can access it only in the business layer. To access these properties in presentation layer, I changed the scope to public. Now I can access the properties also from presentation layer. But there is hundreds of string in this resource file. So it is difficult to modify each property. How can I overcome this problem? Please help me. Thanks & Regards, Hogan

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Sounds like the class belongs in the presentation layer, seeing as it consists of rendering details.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      H 1 Reply Last reply
      0
      • C Christian Graus

        Sounds like the class belongs in the presentation layer, seeing as it consists of rendering details.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        H Offline
        H Offline
        hogan smith
        wrote on last edited by
        #3

        Sorry I didn't get you. Can you please explain it little bit more? Thanks Hogan

        C 1 Reply Last reply
        0
        • H hogan smith

          Sorry I didn't get you. Can you please explain it little bit more? Thanks Hogan

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          H 2 Replies Last reply
          0
          • C Christian Graus

            Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            H Offline
            H Offline
            hogan smith
            wrote on last edited by
            #5

            No sir. I want to use it in both layer. That's why I created it in BL. For example I created functions to send mail to users. These functions are written in the BL. The mail body is declared in this resource file. So I want to access it in BL. Thanks to spend time with me Hogan

            1 Reply Last reply
            0
            • C Christian Graus

              Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.

              Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              H Offline
              H Offline
              hogan smith
              wrote on last edited by
              #6

              oh I can pass it as parameters. Sorry to waste your time for these silly questions. But I am curious, is there any way to access resource files in different assemblies? Thanks and Regards, Hogan

              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