Html input tag with server resource string

I have an enter button in an ASP.NET form, but I want the text to be displayed from a server side resource file.

The following syntax fails, and I cannot enclose it in a literal, because the input tag cannot contain any other tags:

<input id="btnX" type="button" disabled="disabled" value='<%$Resources:res,Button.Text%>' /> 

Any possible solutions?

Thanks:)

+4
source share
3 answers

What about <% = function%>?

+2
source

I think the answer to the apocalypse should work:

 <%= GetLocalResourceObject("Button.Text") %> 

or

 <%= GetGlobalResourceObject("res", "Button.Text") %> 
+5
source

It will work if you add runat="server" to the input tag.

+4
source

All Articles