I have a user control I have created that needs to reference both a CSS and JS file to function correctly. I've gone through the recommended steps to get them to show up in the page (calls to Page.ClientScript.GetWebResourceUrl return the values I need) and
I see them in the HTML but if I copy and paste the URL into a different browser tab, I get a 404 error.
I wanted to put this into a UserControl so I wouldn't have to replicate my code in two separate pages that will be using the functionality in this control. I want to make sure the JS and CSS is included automatically so I won't have to add them to the page
where this control will be used.
Here's a snipped of my code that runs in the Page_Load event handler:
var javaScriptUrl = this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyApp.Controls.Resources.MyScript.js");
if (!Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType( ...
Go to the complete details ...