Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async void Submit1_ServerClick(object sender, EventArgs e)
- {
- string fn = Path.GetFileName(File1.PostedFile.FileName);
- string SaveLocation = Server.MapPath("Data") + "\" + fn;
- if (!File.Exists(SaveLocation))
- {
- File1.PostedFile.SaveAs(SaveLocation);
- await Task.Run(() => Program.Main());
- //IAsyncResult result = Task.Run(() =>caller.BeginInvoke(null, null));
- //caller.EndInvoke(result);
- Response.Write("The file has been uploaded and the Estimated Values should now be reflected in Rally.");
- }
- else
- {
- File.Delete(SaveLocation);
- File1.PostedFile.SaveAs(SaveLocation);
- await Task.Run(() => Program.Main());
- //IAsyncResult result = Task.Run(() => caller.BeginInvoke(null, null));
- //caller.EndInvoke(result);
- Response.Write("The file has been uploaded and the Estimated Values should now be reflected in Rally.");
- }
- }
Add Comment
Please, Sign In to add comment