protected override void Render(HtmlTextWriter writer)
{
string url = string.Format("{0}/con001_projectmanage/job/downloadresume.aspx?resumeid={1}",
Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery,string.Empty).TrimEnd('/').ToLower(),
Request.QueryString["resumeid"]);
WebClient wb = new WebClient();
byte[] buf = wb.DownloadData(url);//从指定的Uri获取数据
Page.Response.Clear();
Response.Charset = "UTF-8"; //TODO:指定的Charset要与ContentEncoding相一致。
Page.Response.ContentType = "text/html";
Page.Response.AddHeader("content-disposition", "attachment; filename=\"resume.htm\"");
Page.Response.ContentEncoding = Encoding.UTF8;
Page.Response.OutputStream.Write(buf, 0, buf.Length);
Page.Response.Flush();
Page.Response.End();
}
{
string url = string.Format("{0}/con001_projectmanage/job/downloadresume.aspx?resumeid={1}",
Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery,string.Empty).TrimEnd('/').ToLower(),
Request.QueryString["resumeid"]);
WebClient wb = new WebClient();
byte[] buf = wb.DownloadData(url);//从指定的Uri获取数据
Page.Response.Clear();
Response.Charset = "UTF-8"; //TODO:指定的Charset要与ContentEncoding相一致。
Page.Response.ContentType = "text/html";
Page.Response.AddHeader("content-disposition", "attachment; filename=\"resume.htm\"");
Page.Response.ContentEncoding = Encoding.UTF8;
Page.Response.OutputStream.Write(buf, 0, buf.Length);
Page.Response.Flush();
Page.Response.End();
}