I have code for a browse button and I wanted to know how to write the code to output a sucess message if it saves correctly.
Also how to output the file path to a textbox...
here is the code I have so far...
protected void Browse_Click(object sender, EventArgs e)
{
string FileName = "ExporterOutput.txt";
string FilePath = "C:/Users/oZ012D/My Documents/ExporterOutput.txt";
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition", "attachment; filename = " + FileName + ";");
response.TransmitFile(FilePath);
response.Write("Username:");
response.Write(username.Text);
response.Write(" ");
response.Write("Authorization Level:");
response.Write(authlvl.Text);
response.Write(" ");
response.Write("Database:");
response.Write(DropDownList1.Text);
response.Write(" ");
response.Write("Dataset:");
response.Write(DropDownList2.Text);
response.Write(" ");
response.Write("SGMLid:");
response.Write(sgml.Text);
response.Flush();
response.End();
}
Thank you!