I need to backup my database and I want to get that file as a download file. Simply when you get some kind of file from any website, they are just downloaded. I want to backup my database without setting a directory to that.
sqlcmd = new SqlCommand("backup database test to disk='" + backupDIR + "\\" + DateTime.Now.ToString("ddMMyyyy_HHmmss") + ".Bak'", con);
In this coding it sets a backup directory. I want to get that file as a downloaded file via browser.
How can this be achieved?