Ajax & URL Re-writing

2 posts, 0 answers
  1. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 15 Jan 2012 Link to this post

    I've got some controls that do ajax requests on the page, however, i've noticed that they're posting to the wrong page address.


    From a few searches it seems i've got to set the ajaxurl property of the rad ajax manager. Only thing is .. I can't find it. I've looked at the intellisense attributes in both aspx and the code behind file. Neither list an AjaxUrl property. what gives?

    FYI i'm using this version of the controls

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 18 Jan 2012 Link to this post


    The mentioned value was available in the old classic version of the RadAjaxManager control. Currently it is not applicable in the radControls for ASP .Net Ajax.

    You could use the PageRequestManager Initialize event to re-write the url during Ajax request. For example:
         var form = Sys.WebForms.PageRequestManager.getInstance()._form;
         form._initialAction = form.action = window.location.href;

    I hope this helps.

    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top