La visualizzazione del collegamento ipertestuale differisce tra i browser (Firefox vs Internet Explorer)

StackOverflow https://stackoverflow.com/questions/1802609

Domanda

Ecco come do un url al mio hyperlink asp.net in c #

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

Ecco come viene visualizzato in Internet Explorer.

http://myportal/temporary_reports/department_report_20091126_11_25_56_914.xls

Ecco come viene visualizzato in firefoxr.

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

Come risolverò quel problema di differenza?

Grazie.

È stato utile?

Soluzione

Prova con le barre anziché le barre rovesciate:

reportHyperLink.NavigateUrl = string.Format(
    "/temporary_reports/department_report_{0}.xls", numberOfTicks);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top