Hello everybody!...
I use FCKEditor in this case:
I have 1 master page, one aspx page use that MasterPageFile.
and I place FCKeditor in the Content Place Holder.
and then appear problem, I can't get value of FCKeditor in code behind file. Everybody saw the same error, and how to resolve this prolem.
Please help me.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="NewsEdit.aspx.cs" Inherits="News_NewsEdit" ValidateRequest="false"%>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="/AngelWebsite/FCKeditor/" Height="400px">
</FCKeditorV2:FCKeditor>
<br />
<asp:Button ID=btnSave runat=server Width=100 Text="Save" OnClick="btnSave_Click" />
<asp:Button ID=btnCancel runat=server Width=100 Text="Cancel" OnClick="btnCancel_Click" />
<br />
<asp:Label ID=lblSaveMessage runat=server></asp:Label>
</asp:Content>
Code behind below:
protected void btnSave_Click(object sender, EventArgs e)
{
//----set value to save ---
string str_Temp = FCKeditor1.Value;
insert(); //call insert function to insert value into database
}
I use FCKEditor in this case:
I have 1 master page, one aspx page use that MasterPageFile.
and I place FCKeditor in the Content Place Holder.
and then appear problem, I can't get value of FCKeditor in code behind file. Everybody saw the same error, and how to resolve this prolem.
Please help me.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="NewsEdit.aspx.cs" Inherits="News_NewsEdit" ValidateRequest="false"%>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="/AngelWebsite/FCKeditor/" Height="400px">
</FCKeditorV2:FCKeditor>
<br />
<asp:Button ID=btnSave runat=server Width=100 Text="Save" OnClick="btnSave_Click" />
<asp:Button ID=btnCancel runat=server Width=100 Text="Cancel" OnClick="btnCancel_Click" />
<br />
<asp:Label ID=lblSaveMessage runat=server></asp:Label>
</asp:Content>
Code behind below:
protected void btnSave_Click(object sender, EventArgs e)
{
//----set value to save ---
string str_Temp = FCKeditor1.Value;
insert(); //call insert function to insert value into database
}
Re: I can't get FCKeditor value when put it in <asp:Content..
Ok - so I see the FCKeditor in the ContentPlaceHolder and I see where you're trying to get the value in the C# code. But why are you using "fckDetail_document.Value" when your FCKeditor instance has an ID of "FCKeditor1"? I would think that you should be using "FCKeditor1.Value".
Re: I can't get FCKeditor value when put it in <asp:Content..
Thank you fishburn!....
I incorrect ID of FCK it must be FCKeditor1 not fckDetail_document.
But event I use FCKeditor1.value, I can't get value too.
Who pass this case, plaese tell me how.
Re: I can't get FCKeditor value when put it in <asp:Content..
After some day, I found solution for this problem.
If use library FredCK.FCKeditorV2.dll version 2.2.2106.29420. Or later version
Problem solve, very simple.