string FileName = System.Web.HttpUtility.UrlEncode( System.Text.Encoding.UTF8.GetBytes( _FileName ) );

解决方案 »

  1.   

    Sub Page_Load(sender As Object, e As EventArgs)
     
      Dim root As String = "d:\temp\"
      Dim filepath As String = Request.Params("file")
      filepath=System.Web.HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes(filepath));
      If Not filepath Is Nothing Then
        If File.Exists(filepath) And filepath.StartsWith(root) Then
          Dim filename As String = Path.GetFileName(filepath)
          Response.Clear()
          Response.ContentType = "application/octet-stream"
          Response.AddHeader("Content-Disposition", _
            "attachment; filename=""" & filename & """")
          Response.Flush()
          Response.WriteFile(filepath)
        End If
      End IfEnd Sub
      

  2.   

    首先保证你的Web.Config里
        <globalization 
                requestEncoding="utf-8" 
                responseEncoding="utf-8" 
       />
    然后再修改:
    Response.AddHeader("Content-Disposition", "inline;filename="+ System.Convert.ToChar(34) + FileName + System.Convert.ToChar(34) );还不行的话把你的代码贴出来