0
我有,我用我的网站中发送电子邮件一些HTM模板。其中一个在开发环境中具有硬编码的网址。 (IP地址是我们临时托管它进行测试的地方)现在它将被托管,我如何设置此href以便它始终解析为该页面的路径。我可以在每次单击链接时重新检索路径并重写htm文件,但效率不高,必须有一种方法才能在htm模板本身中进行解析。<a>标签的href网站页面HTM模板
<p>
<b>Your temporary Password is: </b><i><%Password%></i><br/>
Follow this link to change your password<br/>
<!--the href below will have to be changed once its hosted-->
<a href="**http://25.39.286.15/Account/ChangePassword.aspx**"> Change your password here </a>
</p>
我已经尝试过这种方式,但它在的Page.ResolveUrl
<a href='<%#Page.ResolveUrl(Eval("Account/ChangePassword.aspx"))%>'> Change your password here </a>
有没有理由硬编码的全路径?为什么不使用相对路径:/Account/ChangePassword.aspx – malkassem 2013-02-22 09:47:45
我所用,在一开始,当然,在开发环境中正常工作,但它是不是当我们把临时的主机服务器上的网站了,因此问题。这是一个htm模板,而不是aspx标记。 – dinotom 2013-02-22 09:50:41
在临时主机服务器上,您的应用程序是否在虚拟目录或IIS中的根目录中运行? – malkassem 2013-02-22 09:56:13