C# 如何做GetRouteUrl?

C# 如何做GetRouteUrl?,c#,asp.net,webforms,url-routing,webforms-routing,C#,Asp.net,Webforms,Url Routing,Webforms Routing,我想打开aspnet.pdf文件,但在url show Report.pdf中,不在url上显示原始文件名。请帮助我如何做到这一点。 这是点击事件 dr.Read(); filePath = dr[1] + ".pdf"; string fn = Server.MapPath("~/" + filePath); string s = GetRouteUr

我想打开aspnet.pdf文件,但在url show Report.pdf中,不在url上显示原始文件名。请帮助我如何做到这一点。 这是点击事件

 dr.Read();
                 filePath = dr[1] + ".pdf";
                 string fn = Server.MapPath("~/" + filePath);
                 string s = GetRouteUrl("lst", new { type = "Report.pdf" });
                 Response.Redirect(s);
这是在Global.asax中

void reg_route(System.Web.Routing.RouteCollection rc)
    {
        filePath = "aspnet.pdf";
        rc.MapPageRoute("lst", "{type}", "~/"+filePath);
    }
这是一个错误

您正在查找的资源已被删除,其名称为 已更改,或暂时不可用

请求的URL:localhost:2127/Report.pdf

物理路径:C:…\WebSites\GetScheduled\Report.pdf