代码
//路径访问绝对地址
string servername = HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
string port = HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
StringBuilder mHttpUrl
= new StringBuilder();
mHttpUrl.Append(
"http://");
mHttpUrl.Append(servername);
if (port.Length > 0)
{
mHttpUrl.Append(
":");
mHttpUrl.Append(port);
}
string mServerName = "~/AppModules/Archives/HTMLIMAGE/index.htm";
mHttpUrl.Append(
this.Page.ResolveUrl(mServerName));

 

相关文章:

  • 2021-11-30
  • 2021-11-30
  • 2021-04-28
  • 2021-07-03
  • 2022-02-18
  • 2022-03-08
猜你喜欢
  • 2021-07-15
  • 2021-11-30
  • 2021-11-02
  • 2022-12-23
  • 2021-11-30
  • 2021-11-30
相关资源
相似解决方案