Problem using FCKeditor value as a stored procedure parameter RRS feed

  • Question

  • User291812822 posted


     I am trying to use the value from FCKeditor as a parameter  for a stored procedure. The problem is I keep getting the error "The name 'FCKeditor1' does not exist in the current context".

    I have managed to display and bind FCKeditor fine so I don't think it s a problem with not adding the assembly to the project.

    Here is the code:


    1    protected void Button1_Click(object sender, EventArgs e)
    2 {
    3 SqlCommand cmd = new SqlCommand("UpdateContent", new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1"].ConnectionString));
    5 cmd.CommandType = CommandType.StoredProcedure;
    8 /*Parameters*/
    9 cmd.Parameters.AddWithValue("@ContentID", ContentDropDownList.Text);
    10 cmd.Parameters.AddWithValue("@Content", FCKeditor1.Value);
    12 cmd.Connection.Open();
    13 cmd.ExecuteNonQuery();
    14 cmd.Connection.Close();
    16 Label1.Visible = true;
    18 Label1.Text = "The content has been updated.";
    19 }


    Thanks in advance

    Wednesday, March 18, 2009 2:20 AM


All replies

  • User191633014 posted

     Try to debug something like this:

    Label1.Text = FCKeditor1.Value
    I think that the problem is in binding of FCKeditor
    Wednesday, March 18, 2009 5:56 AM
  • User1096912014 posted

    We used FCKEditor in our application too. If the thread would not be resolved till night today, I'll check some of our code.

    Wednesday, March 18, 2009 7:12 AM
  • User291812822 posted

    You are right Steelymar,

    I still get the "FCKeditor1' does not exist in the current context" error.

    I am not sure where I am going wrong.

    The FredCK.FCKeditorV2.dll is in the bin directory.

    Any suggestions?

    Wednesday, March 18, 2009 3:31 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 18, 2009 4:32 PM
  • User385750423 posted

    Problem with getting value from FCKeditor (FCKeditor.Value) at ASP.Net

    1. If initial value FCKeditor.Value not set, there is no problem, all values, which are placed to FCKeditor can get with FCKeditor.Value.

    2. Problem: if initial value FCKeditor.Value is not null, then if I want get value, it gives me only initial value.

    I have solved!!!!


    I spent the whole day ... Hardly found the answer.

    Specially registered to write a reply!

    Look! Example:


    // Set initial value to FCKeditor

    void Page_Init(object sender, EventArgs e)

    DataTable dT_01 = new DataTable();
          dT_01 = DataLayerMainContent.ArticlesSelect(2);
          FCKeditor_Edit.Value = dT_01.Rows[0]["ArticleText"].ToString();



    You have not to do this here!!

    protected void Page_Load(object sender, EventArgs e)
          // Not here!!!


    // And get Value from FCKeditor

    protected void Btn_ContentEditedSave_Click(object sender, EventArgs e)
        // And add this value to DataBase
        DataLayerAdminPost.ContentMainEdit(1, FCKeditor_Edit.Value);

    Main Idea!

    Set initial value to FCKeditor at Page_Init!


    Wednesday, December 22, 2010 4:44 PM
  • User-1418680850 posted


    some times it may happen, recreate the page.

    Friday, December 24, 2010 4:46 AM