protected void gvViewSPD_RowCommand(object sender, GridViewCommandEventArgs e) { try { lblMessage.Visible = false; string[] command = e.CommandArgument.ToString().Split(';'); ViewState["NoSPD"] = command[0]; //split parameter nospd, nrpapproval, index switch (e.CommandName) { case "Detail": string URL = "~/newFormRequestDetail.aspx?encrypt=" + Encrypto.Encrypt(e.CommandArgument.ToString()); URL = Page.ResolveClientUrl(URL); ScriptManager.RegisterStartupScript(this, GetType(), "openDetail", "openDetail('" + URL + "');", true); break; case "Approve": lblMessage.Text = approvalSPDUrl.ChangeStatus(command[0], e.CommandName, command[1], command[2]); break; case "Reject": lblMessage.Text = approvalSPDUrl.ChangeStatus(command[0], e.CommandName, command[1], command[2]); break; default: break; } lblMessage.Visible = true; bindFind(); } catch (Exception ex) { LogError.Log_Error(ex, "copy file request", ViewState["NoSPD"].ToString()); } }