protected void Page_Command(object sender, CommandEventArgs e)
 {
     try
     {
         DropDownList lst = ctlSearchView.FindControl("MODULE_NAME") as DropDownList;
         if (e.CommandName == "Search")
         {
             // 10/13/2005 Paul.  Make sure to clear the page index prior to applying search.
             grdMain.CurrentPageIndex = 0;
             grdMain.ApplySort();
             grdMain.DataBind();
         }
         // 12/14/2007 Paul.  We need to capture the sort event from the SearchView.
         else if (e.CommandName == "SortGrid")
         {
             grdMain.SetSortFields(e.CommandArgument as string[]);
         }
         else if (e.CommandName == "Shortcuts.Delete")
         {
             Guid gID = Sql.ToGuid(e.CommandArgument);
             SqlProcs.spSHORTCUTS_Delete(gID);
             SplendidCache.ClearShortcuts(lst.SelectedValue);
             Response.Redirect("default.aspx");
         }
         else if (e.CommandName == "Shortcuts.Edit")
         {
             Guid gID = Sql.ToGuid(e.CommandArgument);
             Response.Redirect("edit.aspx?ID=" + gID.ToString());
         }
         else if (lst != null)
         {
             Guid gID = Sql.ToGuid(e.CommandArgument);
             if (e.CommandName == "Shortcuts.MoveUp")
             {
                 SqlProcs.spSHORTCUTS_ORDER_MoveUp(gID);
                 SplendidCache.ClearShortcuts(lst.SelectedValue);
                 Response.Redirect("default.aspx");
             }
             else if (e.CommandName == "Shortcuts.MoveDown")
             {
                 SqlProcs.spSHORTCUTS_ORDER_MoveDown(gID);
                 SplendidCache.ClearShortcuts(lst.SelectedValue);
                 Response.Redirect("default.aspx");
             }
         }
     }
     catch (Exception ex)
     {
         SplendidError.SystemError(new StackTrace(true).GetFrame(0), ex);
         lblError.Text = ex.Message;
     }
 }