fckeditor :Problem in updating records in database using fckeditor in formview RRS feed

  • Question

  • User1998606514 posted

    I am using fckeditor in formview and html contents are saved in a table in sqlserver.Using fckeditor in edititemtemplate of formview trying to update html of the page But Html content in database do not changed on button click.Here is my code.

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="test2.aspx.cs" Inherits="test2" Title="Untitled Page" validateRequest="false"%>
    <%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:cn %>"
            SelectCommand="SELECT * FROM [content]"
            UpdateCommand="update content set content=@content "></asp:SqlDataSource>
    <asp:FormView ID="FormView1"

    <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" basepath="fckeditor/"
    Value='<%# Bind("Content")%>'>
    <asp:LinkButton ID="button1"
    Text="Update" onclick="button1_Click"

    Saturday, May 1, 2010 1:56 PM

All replies

  • User-2080168305 posted

    I don't think this is a FCKeditor-specific problem. If you are working with a ControlParamter try using the full Name for the ControlID,

    e.g. something like "ContentPlaceHolder1 $FormView1$fckEditor", if "fckEditor" is the ID of the Editor-Control

    Sunday, May 2, 2010 2:20 AM