I was just playing around with ckeditor and can't get the darn thing to work for me. I somehow need to "data bind" the text box just before or at the same time of post back. How do I do that?
Loading the data is fine but when I click update I need to somehow retrieve the new value of the text box. It's not as easy as to call the client from the server to just get whatever is in there right? I need the client to push the changes back?
In dynamic data there is a method for binding the value of the control back to the entity in the following method:
protected override void ExtractValues(IOrderedDictionary dictio开发者_JS百科nary)
{
dictionary[Column.Name] =
ConvertEditedValue(HttpUtility.HtmlEncode(CKEditor.Text));
}
Now that value is always the same it's the value I originally bound to my CKEditor control:
protected override void OnDataBinding(EventArgs e)
{
base.OnDataBinding(e);
if (FieldValue != null)
{
CKEditor.Text = HttpUtility.HtmlDecode(FieldValueEditString);
}
}
How do I solve this? :)
After postback check the Request.Form object in quick watch window and see if you can get the data of the editor over there. I can guarantee that the editor data could be found in the Request.Form object. Then you can take it out and use it !
精彩评论