CmsHttpContext cmsContext;
HierarchyItem deletedObject;
private void Page_Load(object sender, System.EventArgs e)
{
cmsContext = CmsHttpContext.Current;
lblErrorMessage.Text = String.Empty;
string cmsObjectGuid = String.Empty;
if (Request.QueryString["CMSObjectGuid"] != null)
{
cmsObjectGuid = Request.QueryString["CMSObjectGuid"];
deletedObject = cmsContext.Searches.GetByGuid(cmsObjectGuid);
}
// display the path of the object to be deleted
if (!Page.IsPostBack)
{
litCurrentItem.Text = deletedObject.Path;
}
btnYes.Enabled = deletedObject.CanDelete;
}