-1

I have stored file in my server, clients can download files via my page Home.aspx by clicking on an anchor, but i want to edit the original filename before launching download. How can i do it using an ASP.NET HttpHandler. Thanks in advance.

This is my anchor code:

 <% if (document.Path != null) { %>
                        <a id="downloadLink" runat="server" style="margin: 5px" href="<%# CONTENT_DIRECTORY_ROOT + document.Path %>">
                            <%= LanguageManager.GetValue("LABEL_DOWNLOAD") %></a>
                        <% } %>
4

1 回答 1

0

试试RewritePath(newUrl)方法

HttpContext.Current.RewritePath(sUrl)

或者你可以使用

HttpContext.Current.Server.Transfer(sUrl)
于 2012-09-09T15:38:00.677 回答