Created
September 16, 2011 12:52
-
-
Save nul800sebastiaan/1222059 to your computer and use it in GitHub Desktop.
Adding save button to custom tree editpage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="True" CodeBehind="EditPage.aspx.cs" Inherits="SomeCompany.CustomTrees.EditPage" %> | |
<%@ Register Namespace="umbraco.uicontrols" Assembly="controls" TagPrefix="umb" %> | |
<asp:Content ID="Content" ContentPlaceHolderID="body" runat="server"> | |
<umb:UmbracoPanel ID="Panel1" runat="server" hasMenu="true" Text="Edit Group"> | |
<umb:Pane ID="Pane1" runat="server"> | |
<umb:PropertyPanel ID="PPanel0" runat="server" Text="Name"> | |
<asp:TextBox ID="Name" runat="server" MaxLength="150" CssClass="guiInputText guiInputStandardSize"></asp:TextBox> | |
</umb:PropertyPanel> | |
</umb:Pane> | |
</umb:UmbracoPanel> | |
</asp:Content> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using umbraco.BasePages; | |
using umbraco.IO; | |
namespace SomeCompany.CustomTrees | |
{ | |
public partial class EditPage : BasePage | |
{ | |
private int _groupID; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
} | |
protected override void OnInit(EventArgs e) | |
{ | |
base.OnInit(e); | |
var idString = HttpContext.Current.Request.QueryString["id"]; | |
if (!int.TryParse(idString, out _groupID)) return; | |
ImageButton save = Panel1.Menu.NewImageButton(); | |
save.ImageUrl = IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/images/editor/save.gif"; | |
save.AlternateText = "Save"; | |
save.Click += SaveRecord; | |
} | |
private void SaveRecord(object sender, ImageClickEventArgs e) | |
{ | |
// | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment