locked
Setting values in code from global resource file? RRS feed

  • Question

  • User595374214 posted

    Can someone give an example of how to set the valeus in code to a resource file value in VB.NET?

    I want to be able to ste various fields in code for text values based on the approriate resource entry.

    Wednesday, July 26, 2006 9:58 AM

All replies

  • User2012824241 posted
    In code behind for a page or user control you can use this method to retrieve from global resource file

    GetGlobalResourceObject("Resource", "EditImageAltText").ToString()

    This example gets the string with the key EditImageAltText from the App_GlobalResources/Resource.resx file

    Hope it helps,

    Joe

    Wednesday, July 26, 2006 2:24 PM