I want to use strings from my resx-files in my application pages. How can I refer to my resource file?
<h2><%$Resources:MyProject,Test_String_Heading%></h2> results in page crash.
|
I want to use strings from my resx-files in my application pages. How can I refer to my resource file?
|
||||
|
|
|
I don't think you can reference it statically like that. Try this instead:
EDIT: it's $Resources versus &Resources. Thanks for picking that up Bojan! UPDATE: As noted below the $Resources method of referencing a resource is for global resources. The following should work for resources associated with your solution (...no manual copy of resource files required).
All you have to do to make this work is ensure that your resx has its Access Modifier set to Public and use the fully qualified resource name (i.e. namespace.class.resourceid). |
|||||||||||
|