/// <summary> /// Uploads the each page to doc lib. /// </summary> /// <param name="dtBatchUpload">The dt batch upload.</param> private void UploadEachPageToDocLib(DataTable dtBatchUpload) { try { //SPWEB used for Current Batch import log running process. SPWeb Web = SPContext.Current.Web; //Clear the Batch Import log List before starting the Batch new import process. objWellBookBLL = new WellBookBLL(); objWellBookBLL.ClearBatchImportLog(Web.Url, BATCHIMPORTLOGLISTNAME); BatchImportLongRunningProcess objBatchImportLong = new BatchImportLongRunningProcess(Web, dtBatchUpload); UpdateAuditTrailForBatchImport(); Web.AllowUnsafeUpdates = true; Web.Update(); objBatchImportLong.Start(Web); string url = string.Format("{0}{1}?JobId={2}", Web.Url, "/_layouts/LongRunningOperationProgress.aspx", objBatchImportLong.JobId); SPUtility.Redirect(url, SPRedirectFlags.Default, this.Context); } catch (Exception) { throw; } }