开发者

Hyperlink display differs between browsers (Firefox vs Internet Explorer)

Here is how I give a url to my asp.net hyperlink in c#

reportHyperLink.NavigateUrl = "\\temporary_reports\\" + "department_report" + "_" + numberOfTicks + ".xls";

This is how it is displayed in internet explorer.

http://myportal/temporary_reports/department_report_20091126_11_25_56_914.xls

This is how it is 开发者_如何转开发displayed in firefoxr.

http://myportal/myproject/\temporary_reports\department_report_20091126_11_25_56_914.xls

How will I solve that difference problem ?

Thanks.


Try with slashes instead of backslashes:

reportHyperLink.NavigateUrl = string.Format(
    "/temporary_reports/department_report_{0}.xls", numberOfTicks);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜