How can I access the HttpContext.GetGlobalResourceObject () in the javascript (.js) file that is used in my application?
1 answer
Try the following:
Resource is the name of the resource file and the Hello key is the resource
<script type = "text/javascript">
function ShowGreetings() {
var message = '<%=GetGlobalResourceObject("Resource", "Greetings") %>';
alert(message);
}
</script>
also read this: http://www.west-wind.com/Weblog/posts/698097.aspx
+1
a source to share