using System.Data; using System.Data.SqlClient; using System.Configuration; using System.IO; using System; using System.Text; public partial class BackUp : System.Web.UI.Page { SqlConnection con; SqlCommand cmd; SqlDataReader dread; protected void Button2_Click(object sender, EventArgs e) { if (File.Exists(@"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\PatientHistory.bak")) { if (MessageBox.Show(@"Do you want to replace it?", "Back", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { File.Delete(@"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\PatientHistory.bak"); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)