I have several .aspx pages that use the same javascript functions.These functions include code <%= variable%>. I want to pass these functions to a .js file but they are not displayed correctly with Visual Studio and also the functions are not executed.
// -------------- // .Aspx // --------------<head runat="server"> <script type="text/javascript" src="../js/Js_Common.js"></script></head><script language="javascript" type="text/javascript"> var myvariable = fcn_variable();</script> // -------------- // Js_Common.js // -------------- function fcn_variable() { var myvariable = null; myvariable = '<%=Form_Label.ClientID%>'; return myvariable; }