Bee Stings <%$, <%@, <%=, <%#

In aspx files you can use several different tags for embedded code blocks, also called inline code blocks. If you tend to forget what they all mean, here is a short explanation with further links. And here is a longer explanation from MS.

To set a Text of a Label to a resource called Pres in the App_LocalResources for your current page, you shall use this syntax: Text="<%$ Resources: Pres %>". Spaces are optional.

Similarly, to access a resource called Volume in the App_GlobalResources folder in a file called Msg.resx you shall use this syntax: Text="<%$ Resources: Msg, Volume %>". Spaces are optional.


Leave a Reply

Your email address will not be published. Required fields are marked *