I can access language resource file values in mark up fine using below code:
<%=Resources.MainResource.MyKey%>
But I cannot do the same in code behind. Shouldn't it just be as follows:
Dim MyValue = Resources.MainResource.MyKey
I can access language resource file values in mark up fine using below code:
<%=Resources.MainResource.MyKey%>
But I cannot do the same in code behind. Shouldn't it just be as follows:
Dim MyValue = Resources.MainResource.MyKey
I have done the following:
c#
string s = (string)GetGlobalResourceObject("Resource1", "String1");
lit.Text = s;
And it works. It showed me "hi" for the label on my ASP.NET page.