I have a ASP.NET application which allows the user to download file automatically on the client side but after the file downloads my code which is to be executed after file download doesn't work, my page stops working and remains halt until i refresh the page. My code is
cloudBarcodeService.generateFile_Barcode(barcodeList).WriteTo(writer);
writer.Flush();
Response.Clear();
byte[] byteArray = stream.ToArray();
Response.AppendHeader("Content-Disposition", "filename=barcode.xml");
Response.AppendHeader("Content-Length", byteArray.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(byteArray);
writer.Close();
//following text doesn't update
lblSucess.text="Successfully Downloaded";