Posted on 10/04/2008 15:00:42
lak@dkis.dk wrote:
Hi There fellow developers,
Has anyone successfully grab the text from the Dw Editor on at ascx page on postback.
To problem is when using .net controls like Calendar it makes a postback. And all values in Dw Controls are gone.
Is there a hidden way to postback dw values or a my only option to make a session value?
I found a solution to the problem:
I min Aspx or Ascx file
<script language="javascript">
function FCKeditor_OnComplete(editorInstance)
{
editorInstance.Events.AttachEvent('OnAfterLinkedFieldUpdate',escapeValue)
}
function escapeValue(editorInstance)
{
editorInstance.LinkedField.value = escape(editorInstance.LinkedField.value);
}
</script>
In my code behind file
In my button_click code blog
tbBeskrivelse.LoadPostData("tbBeskrivelse", HttpContext.Current.Request.Form);
tbBeskrivelse.Text = HttpUtility.UrlDecode(tbBeskrivelse.Text);
Where tbBeskrivelse is my Editor Id