开发者

ASP.NET - Trailing Slash and Tilde

I've found what seems like a bizarre problem with IIS 6.0 and .NET 3.5. I always use the tilde for all URLs (eg: ~/mypage.aspx) so if I go to mydomain.com/mypage.aspx, everything works fine. If, however, I add a trailing sla开发者_运维百科sh and go to mydomain.com/mypage.aspx/, all links on the page which use the tilde get rendered as mydomain.com/mypage.aspx/otherpage.aspx instead of mydomain.com/otherpage.aspx.

This happens with all controls.

Has anyone had this issue before?


mydomain.com/mypage.aspx/ is a wrong URL. By this URL it will look for mypage.aspx sub-directory. And I think it is working as expected.


You are not supposed to put a slash at the end of the page name. Why do you put that slash? The slash means a folder in the application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜