效果:
思路:
簡單的有兩種方式下載,一種是流下載,一種是WriteFile下載。以下是使用WriteFile下載。
代碼:
LinkButton1_Click( fileName = ; filePath = Server.MapPath( + tb1.Text); FileInfo fileInfo = Response.AddHeader(, + Response.AddHeader( Response.AddHeader(, Response.ContentType = Response.ContentEncoding = System.Text.Encoding.GetEncoding( }