Our current folder arrangement looks like this:
ParentFolder
HostPage1.aspx
UserControlsFolder
UserControl.ascx
AnotherFolder
HostPage2.aspx
The UserControl.ascx file is utilized in both HostPage1.aspx AND HostPage2.aspx
I have an external JS file included in the ASCX, and the path needs to be relative to the Page. Because I have pages at different hierarchical levels, how can I dynamically adjust the path based on whether it's being used in HostPage1 or HostPage2?
If possible, I would prefer not to insert the JS include directive in the hostpages.
EDIT: Can web resources be used in a user control?