FCKEditor doesn't set Value property on postback!
- by Shaul
I'm using FCKEditor on my asp.net web page. It appears beautifully, and the editor looks really good on the front end. Only problem is, the .Value property is not being set on the postback. No matter what changes the user makes to the value of the control on the page, when I click "Submit", the .Value property remains blank.
I have Googled for other solutions, and most of them are of the variety where there's some conflict with Ajax, such as this and this. My problem is not solved by these solutions; it's much more fundamental than that. I'm not doing anything to do with Ajax; I'm just a simple asp.net newbie with a simple web form, and the value property is not being set on postback, not in IE and not in FF.
It appears that at least one other person has had this problem, but no solution yet.
Any ideas?
Thanks!
New information:
I tried this out on a "hello world" test web site - and the test web site works 100%. There is obviously a problem on my page, but I have no idea where to begin tracking this down.
Here's the markup of my page, in case anyone can see anything obvious that my newbie eyes can't:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="EmailTemplateEditForm.aspx.vb"
Inherits="EEI_App.EmailTemplateEditForm" %>
<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>EEI - Email Template</title>
<link rel="stylesheet" href="EEI.css">
<script language="javascript" id="jssembleWare" src="sembleWare.js"></script>
<style type="text/css">
.style1
{
height: 251px;
}
.style2
{
width: 2%;
height: 251px;
}
.style3
{
height: 490px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<%@ register src="header.ascx" tagname="header" tagprefix="uc1" %>
<%@ register src="footer.ascx" tagname="footer" tagprefix="uc1" %>
<uc1:header ID="header1" runat="server" />
<!-- main content area -->
<div class="content">
<!-- title of the page -->
<div class="boxheader">
Email Template
</div>
<div class="standardbox">
<!-- Start Page Main Contents-->
<!-- error messages -->
<div class="errorbox">
<asp:Label ID="lblError" CssClass="ErrorControlStyle" runat="server" EnableViewState="False"
Width="100%"></asp:Label>
</div>
<table class="contenttable">
<tr>
<td align="left" valign="top" class="style3">
<div class="actionbox">
<div class="navheadertitle">
Navigation</div>
<ul>
<li>
<asp:LinkButton ID="btnSubmit" CssClass="LinkButtonStyle" runat="server">Submit</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="btnCancel" CssClass="LinkButtonStyle" runat="server" CausesValidation="false">Cancel</asp:LinkButton>
</li>
</ul>
</div>
</td>
<td align="left" valign="top" class="style3">
<p>
</p>
<table>
<tr class="MCRSFieldRow">
<td class="MCRSFieldLabelCell">
<asp:Label ID="lblEmailTemplate_TemplateName" CssClass="LabelStyle" runat="server"
Width="175">Template Name</asp:Label>
</td>
<td class="MCRSFieldEditCell">
<asp:TextBox ID="txtEmailTemplate_TemplateName" CssClass="TextBoxStyle" runat="server"
Width="100%"></asp:TextBox>
</td>
<td class="MCRSFieldLabelCell">
<asp:Label ID="lblEmailTemplate_TemplateType" CssClass="LabelStyle" runat="server"
Width="175">Template Type</asp:Label>
</td>
<td class="MCRSFieldEditCell">
<asp:RadioButtonList ID="rblEmailTemplate_TemplateType" CssClass="RadioButtonListStyle"
runat="server" RepeatColumns="1" RepeatDirection="Horizontal" Width="135px">
<asp:ListItem Value="1">Cover Letter</asp:ListItem>
<asp:ListItem Value="2">Email</asp:ListItem>
</asp:RadioButtonList>
</td>
<td class="MCRSRowRightCell">
</td>
</tr>
<tr class="MCRSFieldRow">
<td class="MCRSFieldLabelCell">
Composition Date
</td>
<td class="MCRSFieldEditCell">
<asp:Label ID="lblEmailTemplate_CompositionDate" CssClass="ElementLabelStyle" runat="server"
Width="175"></asp:Label>
</td>
<td class="MCRSFieldLabelCell">
Last Used Date
</td>
<td class="MCRSFieldEditCell">
<asp:Label ID="lblEmailTemplate_LastUsedDate" CssClass="ElementLabelStyle" runat="server"
Width="175"></asp:Label>
</td>
<td class="MCRSRowRightCell">
</td>
</tr>
<tr class="MCRSFieldRow">
<td class="MCRSFieldLabelCell">
Composed By
</td>
<td class="MCRSFieldEditCell" colspan="3">
<asp:Label ID="lblPerson_FirstNames" CssClass="ElementLabelStyle" runat="server"></asp:Label>
<asp:Label ID="lblPerson_LastName" CssClass="ElementLabelStyle" runat="server"></asp:Label>
</td>
<td class="MCRSRowRightCell">
</td>
</tr>
<tr class="MCRSFieldRow">
<td class="MCRSFieldLabelCell">
<asp:Label ID="lblEmailTemplate_Subject" CssClass="LabelStyle" runat="server" Width="175">Subject</asp:Label>
</td>
<td class="MCRSFieldEditCell" colspan="3">
<asp:TextBox ID="txtEmailTemplate_Subject" CssClass="TextBoxStyle" runat="server"
Width="100%"></asp:TextBox>
</td>
<td class="MCRSRowRightCell">
</td>
</tr>
<tr class="MCRSFieldRow">
<td class="style1">
<asp:Label ID="lblEmailTemplate_Body" CssClass="LabelStyle" runat="server" Width="175">Body</asp:Label>
</td>
<td class="style1" colspan="3">
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" Height="500px">
</FCKeditorV2:FCKeditor>
</td>
<td class="style2">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<p>
<a class="InputButtonStyle" href="#_swTopOfPage">Top of Page</a>
</p>
</div>
<uc1:footer ID="footer1" runat="server" />
<p>
<asp:TextBox ID="txtEmailTemplate_Body" CssClass="TextAreaStyle" Rows="4" runat="server"
Width="100%" Height="16px" Visible="False"></asp:TextBox>
</p>
</form>
</body>
</html>