Hey,
I am developing a webpart in a new SharePoint 2013 solution. I want to use resource files from a global resource file to fill out controls, like this:
<asp:Literal ID="Literal1" runat="server" Text="<%$Resources:MyResource,LiteralText%>" />
The problem arises when i try to build the solution; the corresponding .ascx.g.cs file is not generated, which results in getting the error message: "The name 'InitializeControl' does not exist in the current context." (This method is normally in the .ascx.g.cs file, though in this case, it is blank)
However if i replace the reference to the resource file with plain text, it builds perfectly without errors, and the .ascx.g.cs file is populated just fine:
<asp:Literal ID="Literal1" runat="server" Text="someText" />
What is causing this? And is there a solution/workaround? I have spent a wast amount of time on this without any luck..
Best regards
Esben Wiberg
I am developing a webpart in a new SharePoint 2013 solution. I want to use resource files from a global resource file to fill out controls, like this:
<asp:Literal ID="Literal1" runat="server" Text="<%$Resources:MyResource,LiteralText%>" />
The problem arises when i try to build the solution; the corresponding .ascx.g.cs file is not generated, which results in getting the error message: "The name 'InitializeControl' does not exist in the current context." (This method is normally in the .ascx.g.cs file, though in this case, it is blank)
However if i replace the reference to the resource file with plain text, it builds perfectly without errors, and the .ascx.g.cs file is populated just fine:
<asp:Literal ID="Literal1" runat="server" Text="someText" />
What is causing this? And is there a solution/workaround? I have spent a wast amount of time on this without any luck..
Best regards
Esben Wiberg