views:

172

answers:

1

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%5Freports/department%5Freport%5F20091126%5F11%5F25%5F56%5F914.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.

+1  A: 

Try with slashes instead of backslashes:

reportHyperLink.NavigateUrl = string.Format(
    "/temporary_reports/department_report_{0}.xls", numberOfTicks);
Darin Dimitrov
Thanks for the nice answer.
stckvrflw