Re: Spotting a save button postback

  •  08-27-2004, 6:23 AM

    Re: Spotting a save button postback

    Nevermind, I ended up creating my own copy of the button and used the __doPostBack javascript method to call my other save button's click method.

     

    For anyone that wishes to do the same thing:

     

    Dim Image1 As New System.Web.UI.WebControls.Image

    Image1.ID = "SaveEditorContent"

    Image1.ToolTip = "Save"

    Image1.ImageUrl = HttpContext.Current.Request.ApplicationPath + /CuteEditor_files/Themes/OfficeXP/save.gif"

    Image1.CssClass = "button"

    Image1.Attributes.Add("onclick", GetPostBackEventReference(btnSave))

    Image1.Attributes.Add("type", "btn")

    Editor1.RegisterCustomButton(Image1)

     

    Then you just need to instantiate the real btnSave in your page somewhere and then you'll be able to fire its click method.  I tried changing the Image1.ID to "btnSave" instead so that I wouldn't need to have another btnSave but when I did that, the editor just rejected my button and didn't display it.

View Complete Thread