Hi all,
nothing happen when i download file
Everything looks fine when i debug code.. there is no error
public void GetFile(int ID)
{
string conStr = "Data Source=localhost;Initial Catalog=My_DB;Integrated Security=True";
SqlConnection conn = new SqlConnection(conStr);
conn.Open();
string query = "Select * From Table where ID=" + ID;
SqlCommand cmd = new SqlCommand(query, conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
int rst = da.Fill(dt);
if (rst > 0)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=" + Path.GetFileName(dt.Rows[0]["File_Path"].ToString()));
Response.ContentType = "mp4";
Response.WriteFile(dt.Rows[0]["File_Path"].ToString() ...
Go to the complete details ...