RadUpload and AjaxManagerProxy

Thread is closed for posting
4 posts, 0 answers
  1. Robert
    Robert avatar
    55 posts
    Member since:
    Aug 2008

    Posted 17 Oct 2008 Link to this post

    Hi,

    I've found some posts in this forum on how to temporarily disable ajax
    when clicking the submit button to upload a file.
    Unfortunately I can't set the "onrequestsart" property on RadAjaxmanager.
    How can I work around this issue?

    Best regards,
    Robert
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Oct 2008 Link to this post

    Hi Robert,

    The property is: ClientEvents-OnRequestStart

    Here is a sample code:

    <telerik:RadAjaxManager ID="RadAjaxManager1"  
        runat="server"  
        ClientEvents-OnRequestStart="onRequestStartHandler"
    </telerik:RadAjaxManager> 

    You can set it only on the RadAjaxManager, not in the RadAjaxManagerProxy.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Robert
    Robert avatar
    55 posts
    Member since:
    Aug 2008

    Posted 17 Oct 2008 Link to this post

    Hi Veselin,

    when I set this property in the ajax manager within the masterpage will it
    disable ajax on all requests? I only want to disable ajax, when the uploda
    button (which resides in the content page) is clicked.

    Best regards,
    Robert
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 20 Oct 2008 Link to this post

    Hi Robert,

    Here is what you can do:

    In the content page declare a global javascript variable:

    var canUpload = false

    Subscribe to the OnClientClick event of the button - it fires before the postback. In that event set the canUpload variable to true. Now, on the onRequestStart event handler stop the ajax if the canUpload variable is true.

    I hope this helps.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top