problem to access user control(.acsx)

B

BL

I am in a problem to access user control(.ascx) on a .aspx page

the following is my scenario

I have following directory structure -

Autoboom
- workshop
-- WSFirst
-showroom
-help

i have a user control help.ascx in folder /autoboom/help

i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP" tagName="HELP" src="~/Help/Help.ascx" />
</controls>

my problem is the help.ascx is working in any folder with same hierarchy of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder down
like /autoboom/workshop/WSFirst

i have already tried to register help control in the same page instead of
web.config but still not working

please suggest me where i am doing wrong

Thanks in advance

-BL
 
G

George Ter-Saakov

"Now working" means???????

Any errors???? Or it's just not doing laundry?


George.
 
B

BL

not any error, also i can debug it, but it is not doing his work, like on
mouse over it should display a tooltip but it is not displaying, also it is
displaying a 'X" sign instead of "?" image

Thanks for responce

-BL
 
G

George Ter-Saakov

You problem is quite easy.
you are using relative path when referencing needed JavaScript and images.

And you should be using absolute path....


Here is the small tutorial

Page url: http://www.mysite.com/autoboom/workshop/mypage.aspx

has a reference to <img src="image/myimage.gif">
this is relative path and browser will make a request for
http://www.mysite.com/autoboom/workshop/image/myimage.gif
which will probably not be found.

If you had <img src="/image/myimage.gif"> (Notice first slash)

browser will look for http://www.mysite.com/image/myimage.gif
which is probably what you wanted....

George.
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top