Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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???
Posted
Updated 28-Apr-13 22:29pm
v2
Comments
sri senthil kumar 29-Apr-13 7:05am    
Hope tild symbol works only for server side controls to mention root folder. If you want to use that sort of linking with html controls write the link starting with '/' then it will work.
ZurdoDev 29-Apr-13 9:49am    
You need to post relevant code.

1 solution

this is how Server control behaves.
they combine the virtual path.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900