I'm trying to convert an ASP.NET web application to use resource files. I haven't used resource files before, so I'm just toying around with them and was wondering if this is possible.
I have a message that returns from a search when no results are found, that prompts the user to return to the home page. A lot of these pages have methods to determine what is the proper page to send the user to, so there are many sections with markup similar to this:
Sorry, but we could not find an item matching your search criteria.
Please adjust your search criteria or
<a href="<%= SomeMethodToDetermineUri() %>">
return to (SomePage)</a>
.
So basically, some type of message, followed by a link or a list of links. Getting the message part works fine, it's the server side code to generate links thats the problem.
What is the best way to put that into a resource file? It is able to recognize the html link part just fine, but the server side code gets inserted as plain text.
Is the only way to break it into 2 resources? (Which seems messy)
<%= Resources.Master.NoSearchResultsFound %>
<a href="<%= SomeMethodToDetermineUri() %>">
<%= Resources.Master.NoSearchResultsFoundReturnLinkText %>
</a>.
Or is there a way to get the page to evaluate the server code?