开发者

Broken link after deploying asp.net web application IIS7

开发者 https://www.devze.com 2023-03-08 07:01 出处:网络
I have my web_app that i want to deploy un开发者_JAVA百科der the existing domain.it/ The problem is that all urls in the web_app are absolute,so all the links are broken.

I have my web_app that i want to deploy un开发者_JAVA百科der the existing domain.it/

The problem is that all urls in the web_app are absolute, so all the links are broken.

How i can say, is it possible, for iis to change the root level of the web_app? I can't deploy web_app folder under root.

Thanks!!


If you use path in such a way, then you don't need to care where your application will be deployed. look below some example....

<img alt="" runat="server" src="~/Images/abc.jpg" />
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/About.aspx">HyperLink</asp:HyperLink>

~ Will map to Application Root Directory

0

精彩评论

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