FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Cannot configure OnSaveClick

Last post 09-04-2008, 7:21 PM by saxmana. 2 replies.
Sort Posts: Previous Next
  •  08-27-2008, 10:43 PM 9399

    Cannot configure OnSaveClick

    After performing a typical .NET event configuration for the OnSaveClick event all the editor does is throw a client side/silent error. There is no postback of any kind.

    typical control declaration...

    <lcb:FreeTextBox ID="Editor" Focus="true" runat="Server" Width="100%" Height="100%" OnSaveClick="Editor_SaveClick" toolbarlayout="Cut,Copy,Paste,Delete;Undo,Redo,Print,Save" />

    typical handler declaration...

        protected void Editor_SaveClick(object sender, EventArgs e) {
            String text = this.Editor.Text;
        }

    Any suggestions/insight?

  •  08-28-2008, 3:09 PM 9402 in reply to 9399

    Re: Is this a .NET version issue

    The freetextbox client script file: FTB-freetextbox.js contains the following function...

    FTB_FreeTextBox.prototype.SaveButton = function() {
     this.StoreHtml(); 
     dotNetName = this.id.split('_').join(':');
     __doPostBack(dotNetName,'Save');
    };

    and this is where the OnSaveClick issue hangs up.

    Are the calls to __doPostBack in freetextbox version 3.1.6 compatible with .NET 3.5?

  •  09-04-2008, 7:21 PM 9431 in reply to 9402

    Re: Force __doPostBack rendoring...

    A solution...

    protected void Page_Load(object sender, EventArgs e) {

            System.Web.HttpContext.Current.Response.Cache.SetNoStore();
            Page.ClientScript.GetPostBackEventReference(this, System.String.Empty);
        }

View as RSS news feed in XML
www.freetextbox.com