Code Snippet posted by:
Niladri.Biswas | Posted on: 5/19/2012 | Category:
JavaScript Codes | Views: 1818 | Status:
[Member] |
Points: 40
|
Alert Moderator
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="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
function Test() {
var value = '<% = Resources.Test.TestValue%>';
alert(value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Test()" />
</div>
</form>
</body>
</html>
Best Regards,
Niladri Biswas