//public ViewMode Mode { get; set; }

        protected void AddItem_Click(object sender, EventArgs e)
        {
            var field = GetField();

            var media = MediasMapper.GetByID(field.MediaDetail.MediaID);

            var fieldAssociation = new FieldAssociation();

            fieldAssociation.MediaDetail = (MediaDetail)PagesMapper.CreateObject(MediaTypeID, MediasMapper.CreateObject(), media);
            fieldAssociation.MediaDetail.SectionTitle              = fieldAssociation.MediaDetail.ShortDescription = fieldAssociation.MediaDetail.MainContent = fieldAssociation.MediaDetail.LinkTitle;
            fieldAssociation.MediaDetail.PathToFile                = "/media/images/icons/File.jpg";
            fieldAssociation.MediaDetail.PublishDate               = DateTime.Now;
            fieldAssociation.MediaDetail.CreatedByUserID           = fieldAssociation.MediaDetail.LastUpdatedByUserID = FrameworkSettings.CurrentUser.ID;
            fieldAssociation.MediaDetail.CachedVirtualPath         = fieldAssociation.MediaDetail.CalculatedVirtualPath();
            fieldAssociation.MediaDetail.LanguageID                = AdminBasePage.CurrentLanguage.ID;
            fieldAssociation.MediaDetail.UseDefaultLanguageLayouts = false;

            var mediaType = MediaTypesMapper.GetByID(fieldAssociation.MediaDetail.MediaTypeID);

            if (mediaType != null)
            {
                fieldAssociation.MediaDetail.UseMediaTypeLayouts = mediaType.UseMediaTypeLayouts;
            }

            field.FieldAssociations.Add(fieldAssociation);
            var returnObj = BaseMapper.SaveDataModel();

            BindValues();
        }