Exemplo n.º 1
0
    /// <summary>
    /// Returns selected item parameters as name-value collection.
    /// </summary>
    public void GetSelectedItem()
    {
        if (ItemProperties.Validate())
        {
            // Get selected item information
            var props = ItemProperties.GetItemProperties();

            // Get JavaScript for inserting the item
            var script = CMSDialogHelper.GetFileSystemItem(props);
            if (!string.IsNullOrEmpty(script))
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "insertItemScript", script, true);
            }
        }
        else
        {
            // Display error message
            pnlUpdateProperties.Update();
        }
    }