Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

HtmlEditorExtender and TextChanged event

$
0
0

Hello,

I have discovered taht the TextChanged event of the TextBox that has an AJAX HtmlEditorExtender extension attached does not occur.

How can I check when the text into the HtmlEditor is changed?

I need some server side event, in order to save the text into e session variable when the control lost the focus.

This is my actual code that doesn't work.

<asp:TextBox runat="server" ID="txtDescrizione" AutoPostBack="True" TextMode="MultiLine" Width="450px" Height="250px" Rows="5" /><br /><cc1:HtmlEditorExtender ID="htmleeDescrizione"
        TargetControlID="txtDescrizione"
        runat="server"
        DisplaySourceTab="True"
        OnImageUploadComplete="ajaxFileUpload_OnUploadComplete"
        Enabled="True"><Toolbar><cc1:Bold /><cc1:Italic /><cc1:Underline /><cc1:HorizontalSeparator /><cc1:JustifyLeft /><cc1:JustifyCenter /><cc1:JustifyRight /><cc1:JustifyFull /><cc1:CreateLink /><cc1:UnLink /><cc1:InsertImage /></Toolbar></cc1:HtmlEditorExtender>

code behind

if (!Page.IsPostBack)
{
	txtDescrizione.TextChanged += new EventHandler(txtDescrizione_LostFocus);
	//
	if (Session["txtDescrizione_temp"] != null)
	{
		txtDescrizione.Text = Convert.ToString(Session["txtDescrizione_temp"]);
	}
}

private void txtDescrizione_LostFocus(object sender, System.EventArgs e)
{
	Session["txtDescrizione_temp"] = System.Web.HttpUtility.HtmlDecode(txtDescrizione.Text);
}



 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>