Call EPiServer resource file from code behind


In EPiServer, when we want to get an xml resource file (e.g. relateplusen.xml) value from markup we use <%$Resources: EPiServer, taglisting.commaseperated %>

In code behind, how do I call that?

Jun 29, 2011 8:05

I'm going to call it from a plain .cs file. which does not inherit from UserControlBase

Jun 29, 2011 8:13

HttpContext.GetGlobalResourceObject("EPiServer", "/taglisting/commaseperated"); 

That should work

Jun 29, 2011 10:24

Thanks a lot Andreas!

Jul 04, 2011 2:59

Looks like this will also work LanguageManager.Instance.Translate("/taglisting/commaseperated");

Jul 04, 2011 4:20
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.