Javascript in webuser control

  • Thread starter Thread starter New User
  • Start date Start date
N

New User

I have following structure for my project


myproj
Controls/control1
morepages/special.aspx
specialpages/webpage1.aspx
scripts/filename.js
default.aspx



I have a control1 which has a public property name
ScriptFilePath for bring in external javascript file.

E.g it works for when I use control in default.aspx using
ScriptFilePath="Scripts/filename.js"
ok when i click on link to navigate it goes to for
example, morepages/special.aspx page.

However,

When I use same control in webpage1.aspx with
ScriptFilePath="../Scripts/filename.js" then
I click on link in webpage1.aspx it produces following
path myproj/specialpages/morepages/special.aspx rather
than morepages/special.aspx.


any ideas


Thanks in advance
 
Back
Top