473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Javascript in webuser control

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

Nov 18 '05 #1
1 990
Try the following:
http://msdn.microsoft.com/library/en...vercontrol.asp
http://msdn.microsoft.com/library/en...jectmodel2.asp

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"New User" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Metior | last post by:
Hi, The error i get is as follows: Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' Login failed for user 'webuser'.
2
by: Vai2000 | last post by:
Hi All, I have a scenario in which I have created a web user control with 3 linkbuttons on it. Now I am using that control in a webform. The thing is I want to display certain regions in my...
0
by: Larry | last post by:
Anyone have an example of a webuser control with a checkbox that passes information to a JavaScript function on the same page? thanks *** Sent via Developersdex http://www.developersdex.com ***
1
by: Larry | last post by:
Anyone have an example of a webuser control with a checkbox that passes information to a JavaScript function on the same page? on the page I have a checkbox and a textbox (both are server...
2
by: =?Utf-8?B?UGFkYW0=?= | last post by:
i have created couple of dynamic controls (dropdownlist and imagebutton) in webuser controls and assigned selected index change event and image button clicked. I am giving names to control...
0
by: =?Utf-8?B?UGFkYW0=?= | last post by:
I created a web user controls. it generates a html table. i want to use this generated html table into code behind file (inside cell of another html table) of another web user control file.
4
by: archana | last post by:
Hi all, i am having one user control. what i want is to add javascript which will gets called on button click of user control. but user control is not working if i add javascript in user...
1
by: cmrchs | last post by:
Hi, I am creating a simple calculator to add 2 values. For the user to enter a value, I have created a web user control consisting of a textbox and some additional logic. I add 2 of those...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.