FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Using the save button

Last post 05-11-2008, 2:04 PM by jfeeney. 0 replies.
Sort Posts: Previous Next
  •  05-11-2008, 2:04 PM 9143

    Using the save button

    I am brand new to using FreeTextBox.

    I have created the following code using the latest 3.x version. I am trying to get the save button to work. (I am trying to avoid having to using a separate VWD button from the toolbox). I am trying to use the save button that is on the FreeTextBox toolbar. I have FreeTextBox on the screen and a Label from the VWD toolbox underneath it.

    This is the code from my default page

    <%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>

    <%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <title>Untitled Page</title>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <FTB:FreeTextBox ID="FreeTextBox1"

    ToolbarStyleConfiguration="Office2000"

    toolbarlayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell"

    onSaveClick="FreeTextBox1_SaveClick"

    runat="server" ButtonSet="Office2003" />

    </div>

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

    </form>

    </body>

    </html>

    And this is from my code behind page

    using System;

    using System.Configuration;

    using System.Data;

    using System.Linq;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.HtmlControls;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Xml.Linq;

    public partial class _Default : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    FreeTextBox1.SaveClick +=new EventHandler(FreeTextBox1_SaveClick);

    }

    protected void FreeTextBox1_SaveClick(object sender, EventArgs e)

    {

    Label1.Text = "Nice Click";

    }

    }

View as RSS news feed in XML
www.freetextbox.com