EditLive! 9 Documentation : Basic ASP.NET Example Code

ASPX Page

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BasicSample.aspx.cs" Inherits="basic_BasicSample" ValidateRequest="false" %>
<%@ Register assembly="EditLiveJavaControl" namespace="EditLiveJavaControl" tagprefix="elj" %>
<!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>Basic Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <elj:EditLiveJava ID="EditLiveJava1" runat="server" 
            DownloadDirectory="../../redistributables/editlivejava"
            ConfigurationFile="../../redistributables/editlivejava/sample_eljconfig.xml"
            Content="&lt;p&gt;Default editor content&lt;/p&gt;&lt;p&gt;More content&lt;/p&gt;"
            />
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
        <br />
        <asp:TextBox ID="TextBox1" runat="server" Height="96px" TextMode="MultiLine" Width="252px" />
        <br />
    </form>
</body>
</html>

C# Code-Behind

using System;
using System.Collections;
using System.Configuration;
using System.Data;
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;
 
public partial class basic_BasicSample : System.Web.UI.Page {
    protected void Button1_Click(object sender, EventArgs e) {
        TextBox1.Text = EditLiveJava1.Content;
    }
}