Javascript in webuser control

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top