public void ShowPopup(bool IsSuccessfull, bool IsValidationMessege, string validationMessege) { if (IsSuccessfull == true) { PopupHeader.ForeColor = Color.Green; PopupHeader.Text = "Information."; if (IsValidationMessege == true) { PopupMessage.Text = validationMessege; } else { PopupMessage.Text = "Data saved successfully."; } } else { PopupHeader.ForeColor = Color.Red; PopupHeader.Text = "Error."; if (IsValidationMessege) { PopupMessage.Text = validationMessege; } else { PopupMessage.Text = "Data Canot Not Save due some error.\n Please contact system your admistrator."; } } MessegePopupExtender.Show(); }
protected void btnSpEdit_Click(object sender, EventArgs e) { foreach (GridViewRow row in gridCollList.Rows) { ControlCollection controls = row.Cells[row.Cells.Count - 1].Controls; if ((LinkButton)controls[1] == (LinkButton)sender) { txtCollectionId.Text = row.Cells[0].Text; txtCollectionId.Columns = 20; txtReason.Columns = 20; txtReason.Rows = 10; txtPassword.Columns = 20; PopupHeader.BackColor = Color.White; MessegePopupExtender.Show(); break; } } }