G
gerry
I have a page that has an asp:Hyperlink control on it.
The NavigateUrl is set to "~/Aaa/Bbb.aspx"
When the link is rendered it is rendered as Aaa/Bbb.aspx which I would think
is completely incorrect.
As I understand the use of the this syntax , ~ should be replaced by the
application path.
so for an application in the root this value should be /Aaa/Bbb.aspx
for an application in the /Ccc/Ddd directory this should be
/Ccc/Ddd/Aaa/Bbb.aspx
I have a site which directs requests to /Default.aspx via url rewriting
the problem is for an url http://site/xxx/yyy/xxx.aspx that is rewritten to
http://site/default.aspx,
the link ends up with a effective href of http://site/xxx/yyy/Aaa/Bbb.aspx
whereas I would expect it to be http://site/Aaa/Bbb.aspx regardless of the
url of the page on which it appears
- is not the whole point of ~/ to make an url relative to the application
root rather than relative to the current page ?
Is this a bug in the Hyperlink control rendering ?
Or do I completely misunderstand the purpose of the ~/ syntax ?
Gerry
The NavigateUrl is set to "~/Aaa/Bbb.aspx"
When the link is rendered it is rendered as Aaa/Bbb.aspx which I would think
is completely incorrect.
As I understand the use of the this syntax , ~ should be replaced by the
application path.
so for an application in the root this value should be /Aaa/Bbb.aspx
for an application in the /Ccc/Ddd directory this should be
/Ccc/Ddd/Aaa/Bbb.aspx
I have a site which directs requests to /Default.aspx via url rewriting
the problem is for an url http://site/xxx/yyy/xxx.aspx that is rewritten to
http://site/default.aspx,
the link ends up with a effective href of http://site/xxx/yyy/Aaa/Bbb.aspx
whereas I would expect it to be http://site/Aaa/Bbb.aspx regardless of the
url of the page on which it appears
- is not the whole point of ~/ to make an url relative to the application
root rather than relative to the current page ?
Is this a bug in the Hyperlink control rendering ?
Or do I completely misunderstand the purpose of the ~/ syntax ?
Gerry