asp.net, try { SqlDataReader reader = this.oCon.GetReader( @"select filesize,contenttype,filedata from file_personal (index=pk_file_personal nolock) where fileid = " + e.Item.Cells[5].Text); this.Page.Response.ContentType = (string)reader["contenttype"]; this.Page.Response.AppendHeader("Content-Disposition:", "attachment; filename=" + HttpUtility.UrlEncode(e.Item.Cells[7].Text)); this.Page.Response.OutputStream.Write((byte[])reader["filedata"], 0, (int)reader["filesize"]); this.Page.Response.End(); } catch { this.Page.RegisterStartupScript("", "alert('error!');"); return; } ASP.NET Windows APP Mobile App http://www.eReach.cn