Postback on any button in the toolbar

Last post 08-18-2005, 6:30 AM by Daniel Krebs. 2 replies.
Sort Posts: Previous Next
  •  08-17-2005, 12:56 PM 9696

    Postback on any button in the toolbar

    If I press the button "insert Image" or "Insert anything" in the toolbar I want to create a folder on my server.
     
    But on those buttons is no postback,
    so I cannot do like I do with the "Save"-Button:
     
    Private Sub Editor2_PostBackCommand(ByVal Sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Handles Editor2.PostBackCommand
     If String.Compare(e.CommandName, "Save", True) = 0 Then
         if ObjektLangbutton_insert.visible=true then 'Einfügen
       ObjektLang_Insert(ObjektLangbutton_Insert,nothing)
      end if
      if ObjektLangbutton_update.visible=true then 'Speichern
       ObjektLang_Update(ObjektLangbutton_Update,nothing)
      end if
     End If
    End Sub
     
    Can I add a postback for any button? If, how?
     
    thanks for your help in advance,
     
    kind regards, Daniel.
  •  08-17-2005, 7:22 PM 9712 in reply to 9696

    Re: Postback on any button in the toolbar

    Daniel,
     
    You can achieve this by modifying the Toolbar Configuration file.
     
     
    
        <toolbars>
            <item type="g_start" />
            <item type="image" name="Save" postback="True" />
            <item type="image" name="Print" />
            <item type="image" name="Find" />
            <item type="image" name="ToFullPage" imagename="fit" hotkey="F12" />
            <item type="image" name="FromFullPage" imagename="restore" hotkey="F12" />

    For example, you want to the print button trigger the postback event.
     
    The code should be:

    <toolbars> <item type="g_start" /> <item type="image" name="Save" /> <item type="image" name="Print" postback="True" /> <item type="image" name="preview" imagename="bspreview"/> <item type="image" name="Find" /> <item type="image" name="ToFullPage" imagename="fit" hotkey="F12" /> <item type="image" name="FromFullPage" imagename="restore" hotkey="F12" />
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-18-2005, 6:30 AM 9730 in reply to 9712

    Re: Postback on any button in the toolbar

    When I do that:
     
    <item type="image" postback="True" name="ImageGalleryByBrowsing" imagename="image" />
      <item type="image" postback="True" name="InsertImage" imagename="eximage" />
     
    the dialog for inserting the image is not opened anymore.
View as RSS news feed in XML