
<%@ Page Language="C#" validateRequest="false" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<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 )
{
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>";
}
</script>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.t1 (nom) VALUES (?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_jog"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_jog"] %>'
Expression='<%# Request.Form["MM_insert"] == "form1" %>'
CreateDataSet="false"
Debug="true"
>
<Parameters>
<Parameter Name="FCKeditor1" Value='<%# ((Request.Form["FCKeditor1"] != null) && (Request.Form["FCKeditor1"].Length > 0)) ? Request.Form["FCKeditor1"] : "" %>' Type="WChar" />
</Parameters>
</MM:Insert>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_jog"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_jog"] %>'
CommandText='<%# "SELECT * FROM dbo.t1" %>'
Debug="true"
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<form method="post" name="form1" runat="server">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Nom:</td>
<FCKeditorV2:FCKeditor ID="FCKeditor1" Width="600" height="300" BasePath="~/fckeditor/" runat="server">
</FCKeditorV2:FCKeditor>
<td><asp:textbox id="nom" TextMode="SingleLine" Columns="32" runat="server" />
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Insérer l'enregistrement"></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<ASP:Repeater runat="server" DataSource='<%# DataSet1.DefaultView %>'>
<ItemTemplate>
<p><%# DataSet1.FieldValue("nom", Container) %></p>
</ItemTemplate>
</ASP:Repeater>
</body>
</html>