Including .JS file in ASP.NET for runat=server
Posted on 2007-11-26
I'm doing my first ASP.NET integration with SecPay, (an online payment provider in the UK). I've done plenty of integrations in classic ASP but am now struggling to get the md5 check to work in ASP.NET.
I'm falling at the first hurdle of including the JS file. In classic ASP, the SCRIPT tag was as follows:
<SCRIPT LANGUAGE="JScript" RUNAT="Server" SRC="includes\md5.js">
But if I try and place this in my .aspx file in Visual Studio 2005, the </script> tag for my codebehind gets underlined in blue and the useful error message of "Syntax Error" gets displayed.
If I place my JS SCRIPT tag above my codebehind <script> tag, the Page Directive "<%@ Page Language="VB" ... " gets underlined with the error message 'Syntax Error'.
how do I include ths JS file so that I can call it's functions from my page load sub?