RAD Item Command Events Handeling

protected void grdUser_ItemCommand(object source, GridCommandEventArgs e)
{
try
{
if (e.CommandName.ToUpper().Equals("EDITCONTENT"))
{
Session["ContentIDToUpdate"] = e.Item.Cells[3].Text;
Session["EditCONTENTTYPEID"] = e.Item.Cells[18].Text; // Assigning ContentTypeID
Session["ContUserId"] = e.Item.Cells[2].Text;
Session["CurrentPage"] = gridValue;//GRID
GenericSessions.CurrentPage = gridValue;//GRID

if (e.CommandArgument.Equals("MMS"))
Response.Redirect("EditMMSContent.aspx", false);
else
Response.Redirect("EditContent.aspx", false);
}
if (e.CommandName.ToUpper().Equals("MAPCONTENT"))
{
Session["ContentIDToUpdate"] = e.Item.Cells[3].Text;
Session["EditCONTENTTYPEID"] = e.Item.Cells[18].Text;
Session["CurrentPage"] = gridValue;
GenericSessions.CurrentPage = gridValue;
Response.Redirect("ManageRelatedContent.aspx", false);
}

0 comments: