I'm trying to embed a javascript file in a DNN module, the script tag is created but the content is a 404 error.
The namespace of my project is "Carroussel" the location of my file is "js/jquery-carouFredSel-6.2.1.js"
I've added the following code to AssemblyInfo.cs
[assembly: WebResource("Carroussel.js.jquery-carouFredSel-6.2.1.js", "application/javascript", PerformSubstitution = true)]
And the following to the OnInit of the module:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Page.ClientScript.RegisterClientScriptResource(GetType(), "Carroussel.js.jquery-carouFredSel-6.2.1.js");
}
The scripttag is created in my html:
<script src="/WebResource.axd?d=gnpD_kHZKrDN3DKUCn2faE-x6tdus2cDJ1HjymfAToCQgqX2ggJno51OH2VqPx8ArZPoUm5RuWxhg8uAOTZaysKJE7jz3kpB6gHWbD25o2plphslAJao3Rs5ybJz_M9vLB1NmgPujgOBCt3pDGs9aY_lTy04oPXMqX6dyz0AHhjrbZlKl8muO0ZRGnAiWwdicmeAlg2&t=635349640675857733" type="text/javascript"></script>
But as soon as I view the source i get:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /WebResource.axd
Any ideas on what to change to make this working?