I have a strange issue ... I want to retrieve resources programmatically from a SharePoint default resource file wss. So in one of my controls im executing the following code:
protected override void CreateChildControls()
{
this.Controls.Clear();
LiteralControl literalControl = new LiteralControl();//"<%$Resources:wss,view_selector_view%>");
string view=SPUtility.GetLocalizedString("$Resources:wss,view_selector_view", "wss", SPContext.Current.Web.Language);
literalControl.Text = view;
this.Controls.Add(literalControl);
base.CreateChildControls();
}
It seems to be ok, and I found examples which use the same way BUT the result I get is not what i want to see: There result is following:
"$Resources:wss,view_selector_view;"
What do i miss?
Update: After investigating the issue, I discorvered that SPUtility doesn't find the wss.resx files, as it is located in 14hive/Resources, BUT it searches in the wwwroot/App_GlobalResrouces ... is it normal that a webcontrol cannot retrieve resources from 14/Resources?
I had to search for another key which would provide me the value, but view_selector_view was a perfect match ... but not accesible as it was in wss.