London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Call EPiServer resource file from code behind

Vote:
 

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?

#51928
Jun 29, 2011 8:05
Vote:
 

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

#51929
Jun 29, 2011 8:13
Vote:
 

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

That should work

#51936
Jun 29, 2011 10:24
Vote:
 

Thanks a lot Andreas!

#52031
Jul 04, 2011 2:59
Vote:
 

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

#52035
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.