protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// Register an empty OnSubmit statement so the ASP.NET WebForm_OnSubmit method will be automatically
// created and our behavior will be able to wrap it to encode html tags prior to submission
ScriptManager.RegisterOnSubmitStatement(this, typeof(HtmlEditorExtender), "HtmlEditorExtenderOnSubmit", "null;");
// If this extender has default focus, use ClientState to let it know
ClientState = (string.Compare(Page.Form.DefaultFocus, TargetControlID, StringComparison.OrdinalIgnoreCase) == 0) ? "Focused" : null;
// decode values of textbox
var txtBox = (TextBox)TargetControl;
if(txtBox != null)
txtBox.Text = Decode(txtBox.Text);
ajaxFileUpload.Visible = HasImageButton();
}