protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } if (string.IsNullOrEmpty(Request["fId"])) { MessageBox.Show("File ID parameter is missing"); return; } if (string.IsNullOrEmpty(Request["oId"])) { MessageBox.Show("Object ID parameter is missing"); return; } if (string.IsNullOrEmpty(Request["submissionId"])) { MessageBox.Show("Submission ID parameter is missing"); return; } _fileSubmission = DBReadManager.GeFileSubmissionById(Convert.ToDecimal(SubmissionId)); if (_fileSubmission != null) { if (_fileSubmission.SubmissionStatusId == 3 || _fileSubmission.SubmissionStatusId == 4 || _fileSubmission.SubmissionStatusId == 5) { Toolbar1.Items[0].Visible = false; } else { Toolbar1.Items[0].Visible = true; } } var fileId = Convert.ToDecimal(Request["fId"]); using (var data = DBReadManager.GetFileById(fileId)) { if (data.HasRows) { gvDetails.Bind(data); } } }