示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _stylesheetproperty = new businesslogic.web.StylesheetProperty(int.Parse(Request.QueryString["id"]));
            Panel1.Text         = ui.Text("stylesheet", "editstylesheetproperty", getUser());

            if (IsPostBack == false)
            {
                _stylesheetproperty.RefreshFromFile();
                NameTxt.Text  = _stylesheetproperty.Text;
                Content.Text  = _stylesheetproperty.value;
                AliasTxt.Text = _stylesheetproperty.Alias;

                ClientTools
                .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree <loadStylesheetProperty>().Tree.Alias)
                .SyncTree(Request.GetItemAsString("id"), false);
            }
            else
            {
                //true = force reload from server on post back
                ClientTools
                .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree <loadStylesheetProperty>().Tree.Alias)
                .SyncTree(Request.GetItemAsString("id"), true);
            }



            ImageButton bt = Panel1.Menu.NewImageButton();

            bt.Click        += SaveClick;
            bt.ImageUrl      = UmbracoPath + "/images/editor/save.gif";
            bt.AlternateText = ui.Text("save");
            bt.ID            = "save";
            SetupPreView();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _stylesheetproperty = new businesslogic.web.StylesheetProperty(int.Parse(Request.QueryString["id"]));
            Panel1.Text = ui.Text("stylesheet", "editstylesheetproperty", UmbracoUser);

            if (IsPostBack == false)
            {
                _stylesheetproperty.RefreshFromFile();
                NameTxt.Text = _stylesheetproperty.Text;
                Content.Text = _stylesheetproperty.value;
                AliasTxt.Text = _stylesheetproperty.Alias;

                ClientTools
                    .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadStylesheetProperty>().Tree.Alias)
                    .SyncTree(Request.GetItemAsString("id"), false);
            }
            else
            {
                //true = force reload from server on post back
                ClientTools
                    .SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadStylesheetProperty>().Tree.Alias)
                    .SyncTree(Request.GetItemAsString("id"), true);
            }

            

            ImageButton bt = Panel1.Menu.NewImageButton();
            bt.Click += SaveClick;
            bt.ImageUrl = UmbracoPath + "/images/editor/save.gif";
            bt.AlternateText = ui.Text("save");
            bt.ID = "save";
            SetupPreView();
        }