Last post Feb 08, 2012 05:21 AM by replaysMike
Feb 08, 2012 05:10 AM|replaysMike|LINK
I developed my own DB Resource Provider which is working great on it's own.
When I started implementing it in a test page I noticed that it works fine when I use explicit expressions:
<asp:Label ID="litNetImp" runat="server" Text="<%$ Resources: testdata %>"></asp:Label>
but it doesn't work when I use implicit expressions:
<asp:Label ID="litNetImp" runat="server" Text="testdata" meta:resourcekey="testdata"></asp:Label>
I stepped through every line of code and while the implicit does create the provider & reader (so it understands it needs translation), it does not call GetObject() for the translation lookup. Any idea why? GetObject() is called correctly when I use explicit
expressions and there seems to be no difference other than that call.
Feb 08, 2012 05:21 AM|replaysMike|LINK
Found the solution as per this thread: http://forums.asp.net/t/1397788.aspx/1
Implicit keys must end in '.Text' to function - I didn't see this in the documentation (though it might be there, not going to check).