Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
HI experts,

I have created separate Javascript library for Javascript files in my project

i added reference of EmployeeInfo.js file like this within page load event of content page:

C#
((ScriptManager)this.Master.FindControl("ScriptManager1")).Scripts.Add(new ScriptReference("RMSLocalizedResources.Scripts.EmployeeInfo.js", "RMSLocalizedResources"));




I have defined some functions in EmployeeInfo.js file as shown in as below:
JavaScript
function js_EmployeeSave()
{

//some logic

alert('from save function');
}



i used this function is aspx page as shown in below:

ASP.NET
<asp:Button ID="btnSave" runat="server" Text="<%$ Resources:Strings,rc_Save %>"  OnClientClick="js_EmployeeSave();return false;"/>
Posted
Updated 15-Feb-14 3:31am
v2
Comments
Can you check if js file is listing on Script tab of Developer Tool?
argeraju 15-Feb-14 13:10pm    
yes ,i can able see file name in script tab of firebug...
it is something like this..


<script type="text/javascript" src="/ReleaseManagementSystem/WebResource.axd?d=ucSXALbYvYwA3AxeLr5WdGTTX9qP1TJ0HR8zmwva02hI54bFKv79Z62xVBqRL7FkEM2xnTahQ7kyQ4eujyfg-tDDJak1&t=635123145911845518"></script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900