protected async void CommandBtn_Click(Object sender, CommandEventArgs e) { switch ((String)e.CommandName) { case "Download": var success = await _fileOperations.DownloadFileAsync((String)e.CommandArgument); if (success) { DownloadSuccess.Visible = true; } else { failMessage.Text = "Unable to identify file. FileID cannot be an empty string."; DownloadFail.Visible = true; } break; case "Open": var files = await _fileOperations.GetMyFilesAsync((String)e.CommandArgument); MyFiles.DataSource = files; MyFiles.DataBind(); break; } }
protected async void GetFiles(object sender, EventArgs e) { var files = await _fileOperations.GetMyFilesAsync(); MyFiles.DataSource = files; MyFiles.DataBind(); }