Read Resource File values in Javascript

Posted by Niladri.Biswas under JavaScript category on | Points: 40 | Views : 16308
First create a resource file call "Test". Enter the Name as "TestValue" and the Value as "Some Test Value". Next use the below code

<html xmlns="">
<head runat="server">
<script language="javascript" type="text/javascript">
function Test() {

var value = '<% = Resources.Test.TestValue%>';

<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Test()" />

Comments or Responses

Login to post response