Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html input tag with server side resource string

I have an input button on an ASP.NET form, but I want the text displayed to come from a server side resource file.

The following syntax fails, and I can't 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 :)

like image 261
Fiona - myaccessible.website Avatar asked Dec 14 '22 03:12

Fiona - myaccessible.website


1 Answers

I would think apocalypse's answer should work:

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

or

<%= GetGlobalResourceObject("res", "Button.Text") %>
like image 107
John Avatar answered Jan 08 '23 19:01

John