protected void gvComplaints_OnItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandArgument == "Preview") { Edit = false; Session["Edit"] = Edit; int gvComplaintId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ComplaintId"]); Session["ComplaintId"] = gvComplaintId; } else if (e.CommandArgument == "Edit") { Edit = true; Session["Edit"] = Edit; int gvComplaintId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ComplaintId"]); Session["ComplaintId"] = gvComplaintId; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)