一切皆有可能

相信自己

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
    Response.Clear()
    Response.buffer = true   
    Response.ContentType = "application/vnd.ms-excel; utf-8"
    Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8")
    'Response.Charset = "utf-8"
    If Instr(1, Request.ServerVariables("HTTP_USER_AGENT"), "MSIE 4.01") > 0 Then   
        Response.AddHeader("Content-Disposition","inline;filename="+ny+"水电.xls")  
    Else   
        Response.AddHeader("Content-Disposition","attachment;filename="+ny+"水电.xls")   
    End If
posted on 2008-12-11 14:50  李泉生  阅读(180)  评论(0)    收藏  举报