Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample01.aspx
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample01.aspx	(revision 1198)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample01.aspx	(revision 1199)
@@ -1,5 +1,6 @@
-<%@ Page ValidateRequest="false" Language="C#" AutoEventWireup="false" %>
-<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+﻿<%@ Page Language="C#" %>
+
+<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <%--
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
@@ -24,45 +25,75 @@
  * Sample page.
 --%>
-<script runat="server" language="C#">
-	// This sample doesnt use a code behind file to avoid the user to have to compile
-	// the page to run it.
-	protected override void OnLoad(EventArgs e)
+<script runat="server">
+
+	// In this page, we are placing all server side code inline to the page, to
+	// avoid having to compile the page in your web site to run it.
+	// Of course it would work in the same way with Code Behind.
+
+	protected void Page_Load( object sender, EventArgs e )
 	{
-		// Automatically calculates the editor base path based on the _samples directory.
-		// This is usefull only for these samples. A real application should use something like this:
-		// FCKeditor1.BasePath = '/FCKeditor/' ;	// '/FCKeditor/' is the default value.
-		string sPath = Request.Url.AbsolutePath ;
-		int iIndex = sPath.LastIndexOf( "_samples") ;
-		FCKeditor1.BasePath = sPath.Remove( iIndex, sPath.Length - iIndex  ) ;
+		if ( Page.IsPostBack )
+			return;
+
+		// Set the startup editor value.
+		FCKeditor1.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKeditor</a>.</p>";
 	}
+
+	protected void BtnSubmit_Click( object sender, EventArgs e )
+	{
+		// For sample purposes, print the editor value at the bottom of the
+		// page. Note that we are encoding the value, so it will be printed as
+		// is, intead of rendering it.
+		LblPostedData.Text = HttpUtility.HtmlEncode( FCKeditor1.Value );
+
+		// Make the posted data block visible.
+		PostedDataBlock.Visible = true;
+		PostedAlertBlock.Visible = true;
+	}
+
 </script>
-<html>
-	<head>
-		<title>FCKeditor - Sample</title>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-		<meta name="robots" content="noindex, nofollow">
-		<link href="../sample.css" rel="stylesheet" type="text/css" />
-		<script type="text/javascript">
-
-function FCKeditor_OnComplete( editorInstance )
-{
-	window.status = editorInstance.Description ;
-}
-
-		</script>
-	</head>
-	<body>
-		<h1>FCKeditor - ASP.Net - Sample 1</h1>
-		This sample displays a normal HTML form with an FCKeditor with full features 
-		enabled.
-		<br>
-		No code behind is used so you don't need to compile the ASPX pages to make it 
-		work. All other samples use code behind.
-		<hr>
-		<form action="sampleposteddata.aspx" method="post" target="_blank">
-			<FCKeditorV2:FCKeditor id="FCKeditor1" runat="server" value='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'></FCKeditorV2:FCKeditor>
-			<br>
-			<input type="submit" value="Submit">
-		</form>
-	</body>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="robots" content="noindex, nofollow" />
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+	<style type="text/css">
+		pre { background-color: #f5f5f5; padding: 5px; border: #d3d3d3 1px solid; }
+	</style>
+</head>
+<body>
+	<form runat="server">
+		<h1>
+			FCKeditor - ASP.NET - Sample 1
+		</h1>
+		<p>
+			This sample displays a normal HTML form with an FCKeditor with full features enabled.
+		</p>
+		<p>
+			No code behind is used so you don't need to compile the ASPX pages to make it work.
+			All other samples use code behind.
+		</p>
+		<p id="PostedAlertBlock" style="color: Red" runat="server" visible="false">
+			The posted data has been printed at the bottom of the page.
+		</p>
+		<p>
+			<!---
+				Here we have the FCKeditor component tag. It has been created
+				by dragging the FCKeditor icon from the toolbar to the page, in design mode.
+			--->
+			<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
+			</FCKeditorV2:FCKeditor>
+		</p>
+		<p>
+			<asp:Button ID="BtnSubmit" runat="server" OnClick="BtnSubmit_Click" Text="Submit" />
+		</p>
+	</form>
+	<div id="PostedDataBlock" runat="server" visible="false">
+		<p>
+			Posted data:
+		</p>
+		<pre><asp:Label ID="LblPostedData" runat="server"></asp:Label></pre>
+	</div>
+</body>
 </html>
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx	(revision 1199)
@@ -0,0 +1,153 @@
+﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sample02.aspx.cs" Inherits="_samples_aspx_sample02" %>
+
+<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page.
+--%>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="robots" content="noindex, nofollow" />
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+	<style type="text/css">
+		pre { background-color: #f5f5f5; padding: 5px; border: #d3d3d3 1px solid; }
+	</style>
+	<script type="text/javascript">
+
+//
+// Here we are using JavaScript to retrieve the available languages from
+// FCKeditor. This is completely optional and is needed onl for sample purposes.
+//
+// It shows also how to interact with the editor instance through JavaScript.
+//
+
+/**
+ * FCKeditor_OnComplete is a special function which is called when an FCKeditor
+ * instance is loaded on the page and available for code interaction.
+ */
+function FCKeditor_OnComplete( editorInstance )
+{
+	// Get the language combo.
+	var combo = document.getElementById( 'xLanguages' ) ;
+
+	// Remove all options. (#1399)
+	combo.innerHTML = '' ;
+	
+	// Retrieve the available languages object.
+	var availableLanguages = editorInstance.Language.AvailableLanguages ;
+	
+	// Fill an array with all available languages.
+	var languages = new Array() ;
+	for ( code in availableLanguages )
+		languages.push( { Code : code, Name : availableLanguages[code] } ) ;
+
+	// Sort the array using a custom comparison function.
+	languages.sort( SortLanguage ) ;
+
+	// Add all languages to the combo.
+	for ( var i = 0 ; i < languages.length ; i++ )
+		AddComboOption( combo, languages[i].Name + ' (' + languages[i].Code + ')', languages[i].Code ) ;
+	
+	// Set the combo value to the current language.
+	combo.value = editorInstance.Language.ActiveLanguage.Code ;
+	
+	combo.style.visibility = '' ;
+}
+
+/**
+ * Custom function to sort the language entries.
+ */
+function SortLanguage( langA, langB )
+{
+	return ( langA.Name < langB.Name ? -1 : langA.Name > langB.Name ? 1 : 0 ) ;
+}
+
+/**
+ * Utility function to append options in a <select> element.
+ */
+function AddComboOption( combo, optionText, optionValue )
+{
+	var option = document.createElement( 'option' ) ;
+
+	combo.options.add( option ) ;
+
+	option.innerHTML = optionText ;
+	option.value     = optionValue ;
+
+	return option ;
+}
+
+/**
+ * Reloads the page, passing the specified language code in the querystring.
+ */
+function ChangeLanguage( languageCode )
+{
+	window.location.href = window.location.pathname + "?lang=" + languageCode ;
+}
+
+	</script>
+</head>
+<body>
+	<form runat="server">
+		<h1>
+			FCKeditor - ASP.NET - Sample 2</h1>
+		<p>
+			This sample shows the editor in all its available languages.
+		</p>
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select a language:&nbsp;
+				</td>
+				<td>
+					<select id="xLanguages" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
+						<option>&nbsp;</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<p id="PostedAlertBlock" style="color: Red" runat="server" visible="false">
+			The posted data has been printed at the bottom of the page.
+		</p>
+		<div style="margin-top: 10px;">
+			<!---
+				Here we have the FCKeditor component tag. It has been created
+				by dragging the FCKeditor icon from the toolbar to the page, in design mode.
+			--->
+			<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
+			</FCKeditorV2:FCKeditor>
+		</div>
+		<p>
+			<asp:Button ID="BtnSubmit" runat="server" Text="Submit" OnClick="BtnSubmit_Click" />
+		</p>
+		<div id="PostedDataBlock" runat="server" visible="false">
+			<p>
+				Posted data:
+			</p>
+			<pre><asp:Label ID="LblPostedData" runat="server"></asp:Label></pre>
+		</div>
+	</form>
+</body>
+</html>
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx.cs
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx.cs	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample02.aspx.cs	(revision 1199)
@@ -0,0 +1,71 @@
+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 _samples_aspx_sample02 : System.Web.UI.Page
+{
+	protected void Page_Load( object sender, EventArgs e )
+	{
+		// Set the base path. This is the URL path for the FCKeditor
+		// installations. By default "/fckeditor/".
+		FCKeditor1.BasePath = this.GetBasePath();
+
+		if ( Request.QueryString[ "lang" ] != null )
+		{
+			// Disable the language automatic detection (note that we always use strings).
+			FCKeditor1.Config[ "AutoDetectLanguage" ] = "false";
+
+			// Set the language to the querystring value.
+			FCKeditor1.Config[ "DefaultLanguage" ] = Request.QueryString[ "lang" ];
+		}
+		else
+		{
+			// Enable language automatic detection (default).
+			FCKeditor1.Config[ "AutoDetectLanguage" ] = "true";
+
+			// Set the default language to English (default). Used if the user
+			//language is not available in FCKeditor.
+			FCKeditor1.Config[ "DefaultLanguage" ] = "en";
+		}
+
+		if ( Page.IsPostBack )
+			return;
+
+		// Set the startup editor value.
+		FCKeditor1.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKeditor</a>.</p>";
+	}
+
+	/// <summary>
+	/// Automatically calculates the editor base path based on the _samples
+	/// directory. This is usefull only for these samples. A real application
+	/// should use something like this instead:
+	/// <code>
+	/// FCKeditor1.BasePath = "/fckeditor/" ;	// "/fckeditor/" is the default value.
+	/// </code>
+	/// </summary>
+	private string GetBasePath()
+	{
+		string path = Request.Url.AbsolutePath;
+		int index = path.LastIndexOf( "_samples" );
+		return path.Remove( index, path.Length - index );
+	}
+
+	protected void BtnSubmit_Click( object sender, EventArgs e )
+	{
+		// For sample purposes, print the editor value at the bottom of the
+		// page. Note that we are encoding the value, so it will be printed as
+		// is, intead of rendering it.
+		LblPostedData.Text = HttpUtility.HtmlEncode( FCKeditor1.Value );
+
+		// Make the posted data block visible.
+		PostedDataBlock.Visible = true;
+		PostedAlertBlock.Visible = true;
+	}
+}
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx	(revision 1199)
@@ -0,0 +1,79 @@
+﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sample03.aspx.cs" Inherits="_samples_aspx_sample03" %>
+
+<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page.
+--%>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="robots" content="noindex, nofollow" />
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+	<style type="text/css">
+		pre { background-color: #f5f5f5; padding: 5px; border: #d3d3d3 1px solid; }
+	</style>
+</head>
+<body>
+	<form runat="server">
+		<h1>
+			FCKeditor - ASP.NET - Sample 3</h1>
+		<div>
+			This sample shows how to change the editor toolbar.
+		</div>
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td style="height: 21px">
+					Select the toolbar to load:&nbsp;
+				</td>
+				<td style="height: 21px">
+					<asp:DropDownList ID="cmbToolbars" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cmbToolbars_SelectedIndexChanged">
+						<asp:ListItem Selected="True">Default</asp:ListItem>
+						<asp:ListItem>Basic</asp:ListItem>
+					</asp:DropDownList>&nbsp;</td>
+			</tr>
+		</table>
+		<p id="PostedAlertBlock" style="color: Red" runat="server" visible="false">
+			The posted data has been printed at the bottom of the page.
+		</p>
+		<div style="margin-top: 10px;">
+			<!---
+				Here we have the FCKeditor component tag. It has been created
+				by dragging the FCKeditor icon from the toolbar to the page, in design mode.
+			--->
+			<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
+			</FCKeditorV2:FCKeditor>
+		</div>
+		<p>
+			<asp:Button ID="BtnSubmit" runat="server" Text="Submit" OnClick="BtnSubmit_Click" />
+		</p>
+		<div id="PostedDataBlock" runat="server" visible="false">
+			<p>
+				Posted data:
+			</p>
+			<pre><asp:Label ID="LblPostedData" runat="server"></asp:Label></pre>
+		</div>
+	</form>
+</body>
+</html>
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx.cs
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx.cs	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample03.aspx.cs	(revision 1199)
@@ -0,0 +1,62 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+public partial class _samples_aspx_sample03 : System.Web.UI.Page
+{
+	protected void Page_Load( object sender, EventArgs e )
+	{
+		// Set the base path. This is the URL path for the FCKeditor
+		// installations. By default "/fckeditor/".
+		FCKeditor1.BasePath = this.GetBasePath();
+
+		LblPostedData.Text = "";
+		PostedAlertBlock.Visible = false;
+		PostedDataBlock.Visible = false;
+
+		if ( Page.IsPostBack )
+			return;
+
+		// Set the startup editor value.
+		FCKeditor1.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKeditor</a>.</p>";
+	}
+
+	/// <summary>
+	/// Automatically calculates the editor base path based on the _samples
+	/// directory. This is usefull only for these samples. A real application
+	/// should use something like this instead:
+	/// <code>
+	/// FCKeditor1.BasePath = "/fckeditor/" ;	// "/fckeditor/" is the default value.
+	/// </code>
+	/// </summary>
+	private string GetBasePath()
+	{
+		string path = Request.Url.AbsolutePath;
+		int index = path.LastIndexOf( "_samples" );
+		return path.Remove( index, path.Length - index );
+	}
+
+	protected void BtnSubmit_Click( object sender, EventArgs e )
+	{
+		// For sample purposes, print the editor value at the bottom of the
+		// page. Note that we are encoding the value, so it will be printed as
+		// is, intead of rendering it.
+		LblPostedData.Text = HttpUtility.HtmlEncode( FCKeditor1.Value );
+
+		// Make the posted data block visible.
+		PostedDataBlock.Visible = true;
+		PostedAlertBlock.Visible = true;
+	}
+
+	protected void cmbToolbars_SelectedIndexChanged( object sender, EventArgs e )
+	{
+		FCKeditor1.ToolbarSet = cmbToolbars.SelectedValue;
+	}
+}
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx	(revision 1199)
@@ -0,0 +1,81 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sample04.aspx.cs" Inherits="_samples_aspx_sample04" %>
+
+<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Sample page.
+--%>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+	<title>FCKeditor - Sample</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="robots" content="noindex, nofollow" />
+	<link href="../sample.css" rel="stylesheet" type="text/css" />
+	<style type="text/css">
+		pre { background-color: #f5f5f5; padding: 5px; border: #d3d3d3 1px solid; }
+	</style>
+</head>
+<body>
+	<form runat="server">
+		<h1>
+			FCKeditor - ASP.NET - Sample 4</h1>
+		<div>
+			This sample shows how to change the editor skin.
+		</div>
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the skin to load:&nbsp;
+				</td>
+				<td>
+					<asp:DropDownList ID="cmbSkin" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cmbSkin_SelectedIndexChanged">
+						<asp:ListItem Selected="True" Value="default">Default</asp:ListItem>
+						<asp:ListItem Value="office2003">Office 2003</asp:ListItem>
+						<asp:ListItem Value="silver">Silver</asp:ListItem>
+					</asp:DropDownList>
+				</td>
+			</tr>
+		</table>
+		<p id="PostedAlertBlock" style="color: Red" runat="server" visible="false">
+			The posted data has been printed at the bottom of the page.
+		</p>
+		<div style="margin-top: 10px;">
+			<!---
+				Here we have the FCKeditor component tag. It has been created
+				by dragging the FCKeditor icon from the toolbar to the page, in design mode.
+			--->
+			<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
+			</FCKeditorV2:FCKeditor>
+		</div>
+		<p>
+			<asp:Button ID="BtnSubmit" runat="server" Text="Submit" OnClick="BtnSubmit_Click" />
+		</p>
+		<div id="PostedDataBlock" runat="server" visible="false">
+			<p>
+				Posted data:
+			</p>
+			<pre><asp:Label ID="LblPostedData" runat="server"></asp:Label></pre>
+		</div>
+	</form>
+</body>
+</html>
Index: /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx.cs
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx.cs	(revision 1199)
+++ /FCKeditor.Net/trunk/_samples/aspx/2.0/sample04.aspx.cs	(revision 1199)
@@ -0,0 +1,63 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+public partial class _samples_aspx_sample04 : System.Web.UI.Page
+{
+	protected void Page_Load( object sender, EventArgs e )
+	{
+		// Set the base path. This is the URL path for the FCKeditor
+		// installations. By default "/fckeditor/".
+		FCKeditor1.BasePath = this.GetBasePath();
+
+		LblPostedData.Text = "";
+		PostedAlertBlock.Visible = false;
+		PostedDataBlock.Visible = false;
+
+		if ( Page.IsPostBack )
+			return;
+
+		// Set the startup editor value.
+		FCKeditor1.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKeditor</a>.</p>";
+	}
+
+	/// <summary>
+	/// Automatically calculates the editor base path based on the _samples
+	/// directory. This is usefull only for these samples. A real application
+	/// should use something like this instead:
+	/// <code>
+	/// FCKeditor1.BasePath = "/fckeditor/" ;	// "/fckeditor/" is the default value.
+	/// </code>
+	/// </summary>
+	private string GetBasePath()
+	{
+		string path = Request.Url.AbsolutePath;
+		int index = path.LastIndexOf( "_samples" );
+		return path.Remove( index, path.Length - index );
+	}
+
+	protected void BtnSubmit_Click( object sender, EventArgs e )
+	{
+		// For sample purposes, print the editor value at the bottom of the
+		// page. Note that we are encoding the value, so it will be printed as
+		// is, intead of rendering it.
+		LblPostedData.Text = HttpUtility.HtmlEncode( FCKeditor1.Value );
+
+		// Make the posted data block visible.
+		PostedDataBlock.Visible = true;
+		PostedAlertBlock.Visible = true;
+	}
+
+	protected void cmbSkin_SelectedIndexChanged( object sender, EventArgs e )
+	{
+		// Relative to the "editor" folder in the FCKeditor installation.
+		FCKeditor1.Config["SkinPath"] = this.GetBasePath() + "editor/skins/" + cmbSkin.SelectedValue + "/";
+	}
+}
Index: Keditor.Net/trunk/_samples/aspx/2.0/sampleposteddata.aspx
===================================================================
--- /FCKeditor.Net/trunk/_samples/aspx/2.0/sampleposteddata.aspx	(revision 1198)
+++ 	(revision )
@@ -1,49 +1,0 @@
-<%@ Page ValidateRequest="false" Language="C#" AutoEventWireup="false" %>
-<%--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * This page lists the data posted by a form.
---%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
-<html>
-	<head>
-		<title>FCKeditor - Samples - Posted Data</title>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-		<meta name="robots" content="noindex, nofollow">
-		<link href="../sample.css" rel="stylesheet" type="text/css" />
-	</head>
-	<body>
-		<h1>FCKeditor - Samples - Posted Data</h1>
-		This page lists all data posted by the form.
-		<hr>
-		<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
-			<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
-				<td noWrap>Field Name&nbsp;&nbsp;</td>
-				<td>Value</td>
-			</tr>
-			<% foreach ( string sForm in Request.Form ) { %>
-			<tr>
-				<td valign="top" nowrap><b><%=sForm%></b></td>
-				<td width="100%"><%=Server.HtmlEncode( Request.Form[sForm] )%></td>
-			</tr>
-			<% } %>
-		</table>
-	</body>
-</html>
