I have created resource file under Test Project but not under App_GlobalResources.How can i set button text using resource file. For eg:
<asp:Button ID="btnTest" runat="server" Text="<%:TestProject.TestResource.Test%>" />
When i use above code i am getting blank text in the button.
Note - I don't want to set text at code behind.How can i achieve this at aspx file.
Thanks for the help
Assuming your Resourcesfile is called:
/App_GlobalResources/TestResource.resx
And the resource string Test
, this should work:
<asp:Button ID="btnTest" runat="server" Text="<%$ Resources: TestResource, Test %>" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With