如题。最好能给出源代码,急用

解决方案 »

  1.   

    向下载页面传你的数据库的主键 
    hyperlink.NavigateUrl= "download.aspx?id "+要传的id 
    hyperlink.tagit= "_blank " 
    download.aspx: 
    string strId=Request.QueryString( "id ") 
    通过strId从数据库中取出“文件地址” 
    string fleInfo   =   New   System.IO.FileInfo(“文件地址”+   "扩展名 ") 
    Response.Clear() 
    Response.Charset   =   "Shift_JIS " 
    Response.AddHeader( "Content-Disposition ",   "attachment;   filename= "   &   System.Web.HttpUtility.UrlEncode(Request.QueryString( "ShowName "))   +   ".csv ") 
    Response.AddHeader( "Content-Length ",   fleInfo.Length.ToString()) 
    Response.ContentType   =   "text/csv " 
    Response.WriteFile(fleInfo.FullName)