HyperLink.NavigateUrl always adds an extra ../ when going to a higher level directory

N

Nathan Sokalski

Whenever I assign a value to the HyperLink.NavigateUrl property, it adds an
extra ../ in the generated href= attribute of the anchor tag. For example,
when I assign it the value "comments.aspx" the href attribute comes out as
href="../comments.aspx" The location of the file with the code that
generates the anchor is in the root directory, while the aspx file is one
level deeper. Could this be the problem? If it is, how can I fix it so that
I can use it in any directory? Here is my basic file structure:

ROOT
-navigation.ascx
-navigation.ascx.vb (uses navbuttoninfo.vb)
-navbuttoninfo.vb (this is the file where the NavigateUrl property is
assigned)
-PAGE THAT USES NAVIGATION.ASCX
-PAGE THAT USES NAVIGATION.ASCX
-PAGE THAT USES NAVIGATION.ASCX
-PAGE THAT USES NAVIGATION.ASCX
-PAGE THAT USES NAVIGATION.ASCX

Thanks.
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top