title: ckeditor value not saving inside database in c#
body: <p>i have implemented fck editor in my site it is working properly. but now i want to change it into ck editor. the editor is working but the values are not saving to the databse.</p>
  
  <p>this is my code</p>
  
  <pre><code>&lt;CKEditor:CKEditorControl ID="Content" runat="server" BaseHref="~/ckeditor/" Height="400" /&gt;
  
  using System;
  
  using System.Collections.Generic;
  
  using System.Linq;
  
  using System.Web;
  
  using System.Web.UI;
  
  using System.Web.UI.WebControls;
  
  using System.Collections;
  
  using System.Configuration;
  using System.Data;
  
  
  using System.Web.Security;
  
  using System.Web.UI.HtmlControls;
  
  using System.Web.UI.WebControls.WebParts;
  
  using Dump.BLL;
  
  using System.IO;
  
  
  
  
  public partial class managenationtheme : System.Web.UI.Page
  {
  
  
   public static string strThemeName = "State-Default";
  public static string srtType = "State";
  
  protected void Page_Load(object sender, EventArgs e)
  {
      if (!IsPostBack)
      {    
  
  
          lblDynamic.Text = "For Dynamic State add key dynamicobjstate where required";
          strThemeName = "State-Default";
          BindState();
          CheckThemeAvailabilityAndLoadPage(strThemeName);
      }
  }
  
  
  protected void ddlState_SelectedIndexChange(object sender, EventArgs e)
  {
  
    Content.Text = string.Empty;
      chkBoxPublish.Checked = false;
      if (ddlState.SelectedItem.Value != "0")
      {
          strThemeName = "State-" + ddlState.SelectedItem.Text;
          CheckThemeAvailabilityAndLoadPage(strThemeName);
          lblResult.Text = ddlState.SelectedItem.Text + " State Theme :" + btnSave.CommandName.ToUpperInvariant() + " Option"; 
      }
      else
      {
          strThemeName = "State-Default";
          CheckThemeAvailabilityAndLoadPage(strThemeName);
          lblResult.Text = "Default State Theme :" + btnSave.CommandName.ToUpperInvariant() + " Option"; 
      }
  }
  
  public void CheckThemeAvailabilityAndLoadPage(string ThemeNamestr)
  {
  
      DataSet ds = Dump.BLL.Theme.CheckThemeAvailable(ThemeNamestr);
          if (ds.Tables[0].Rows.Count &gt; 0)
          {
              btnSave.Text = "Save";
              btnSave.CommandName = "edit";
          Content.Text = ds.Tables[0].Rows[0]["Theme"].ToString();
              chkBoxPublish.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["ThemePublished"].ToString());
              if (ddlState.SelectedItem.Value == "0")
              {
                  lblResult.Text = "Default State Theme!";
              }
              else
              {
                  lblResult.Text = ddlState.SelectedItem.Value.ToString().ToUpperInvariant() + " State Theme!";
  
              }
          }
          else
          {
              btnSave.Text = "Save";
              btnSave.CommandName = "save";
              chkBoxPublish.Checked = false;
              if (ddlState.SelectedItem.Value == "0")
              {
                  lblResult.Text = "Add Default State Theme!";
                Content.Text = string.Empty;
              }
          }
          BindDataList();
  }
  protected void btnSave_Click(object sender, EventArgs e)
  {
      if (btnSave.CommandName == "save")
      {
          SaveTheme(strThemeName);
      }
      else if (btnSave.CommandName == "edit")
      {
          EditTheme(strThemeName); 
      }
  }
  
  public void EditTheme(string strLocationName)
  {
      Theme objtheme = new Theme();
      objtheme.ThemeName = strLocationName; 
      objtheme.ThemeValue =  Content.Text;
      objtheme.ThemePublished = true;
      int i = Dump.BLL.Theme.Update(objtheme);
      if (i &gt; 0)
      {
          lblResult.Text = "Theme Updated and Published!";
          chkBoxPublish.Checked = true;
      }
      else
      {
          lblResult.Text = "Error!";
      }
      BindDataList();
  }
  
  public void SaveTheme(string strLocationName)
  {
      Theme objtheme = new Theme();
      objtheme.ThemeType = srtType;
      objtheme.ThemeName = strLocationName;
      objtheme.ThemeValue =  Content.Text;
      objtheme.ThemePublished = true;
      objtheme.Zip = "";
      objtheme.City = "";
      if (ddlState.SelectedItem.Value != "0")
      {
          objtheme.State = ddlState.SelectedItem.Value.ToString();
      }
      else
      {
          objtheme.State = "All-State-Default";
      }
      int i = Dump.BLL.Theme.Insert(objtheme);
      if (i &gt; 0)
      {
          lblResult.Text = "Theme Created and Published!";
          btnSave.CommandName = "edit";
          chkBoxPublish.Checked = true;
      }
      else
      {
          lblResult.Text = "Error!";
      }
      BindDataList();
  }
  
  protected void chkBoxPublish_Clicked(Object sender, EventArgs e)
  {
       Theme objtheme = new Theme();
       objtheme.ThemeName = strThemeName;
       objtheme.ThemePublished = chkBoxPublish.Checked;
       int i = Dump.BLL.Theme.CheckPublishStatus(objtheme);
       if (i &gt; 0)
       {
           if (chkBoxPublish.Checked)
           {
               lblResult.Text = "Theme Published!";
           }
           else
           {
               lblResult.Text = "Theme Un-Published!";
           }
  
       }
       BindDataList();
  }
  
  public void BindDataList()
  {
      DataSet ds = Dump.BLL.Theme.GetDefaultThemeStateList();
      if (ds.Tables[0].Rows.Count &gt; 0)
      {
          DataListDefaultState.DataSource = ds.Tables[0];
          DataListDefaultState.DataBind();
          lblDataListDefaultState.Text = "";
      }
      else
      {
          lblDataListDefaultState.Text = "Sorry! No Items added";
      }
  
      DataSet ds2 = Dump.BLL.Theme.GetUniqueThemeStateList();
      if (ds2.Tables[0].Rows.Count &gt; 0)
      {
          DataListUniqueState.DataSource = ds2.Tables[0];
          DataListUniqueState.DataBind();
          lblDataListUniqueState.Text = "";
      }
      else
      {
          lblDataListUniqueState.Text = "Sorry! No Items added";
      }
  
  }
  
  }
  </code></pre>
  
  <p>i have changed only one change  ie, i change Fckeditor1.value to Content.text.</p>
  
  <p>where Content is my ckeditor id.</p>
  
  <p>can anyone help please? </p>