在asp.net中使用不同目录中的html链接标记 [英] Using html link tag in asp.net in different directories
问题描述
Hi ppl。
我在asp.net网站上工作
i在我的解决方案中有切断的直接内容,如:
Page / ContentPages /Forum.aspx
和我解决方案根目录下的另一个名为Home.aspx的文件夹
现在使用母版页和菜单在母版页中女巫有链接到页面,我将链接标签的href属性设置为〜/ Home.aspx女巫在我的根,
,但当我使用链接到href Home.aspx从forums.aspx中,navigateUrl更改为ContentPages /〜/ Home.aspx我的意思是它与我的子目录相结合是灵魂。
更多的东西就是当我使用asp:它固定的超链接,路径还可以......
可以帮我一个人或给一个链接或任何其他东西来获取一些信息这个???
Hi ppl.
im working on an asp.net web site
i have sever directoreies in my solution like:
Page/ContentPages/Forum.aspx
and another folder at root of my solution called Home.aspx
and now im using a master page and a menu in master page witch has links to pages and i set the href attribute of link tag to "~/Home.aspx" witch is in my root,
but when i do use link to href Home.aspx from forums.aspx the navigateUrl is changed to ContentPages/~/Home.aspx i mean its combined with my sub directories is the soultion.
on more thing is that when i use the asp:Hyperlink its fixed and the path is ok...
can some one help me or give a link or any thing else to get some info for this???
推荐答案
这就是服务器控件的行为方式。
它们组合了虚拟路径。
this is how Server control behaves.
they combine the virtual path.
这篇关于在asp.net中使用不同目录中的html链接标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!