This is a migrated thread and some comments may be shown as answers.

Ajax & URL Re-writing

1 Answer 92 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Alan T
Top achievements
Rank 1
Alan T asked on 15 Jan 2012, 10:11 PM
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.

myfirendlyurl/myunfriendlyurl.aspx

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

2011.2.712.40

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 18 Jan 2012, 03:08 PM
Hi,

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:
Sys.Application.add_load(function()
 {
     var form = Sys.WebForms.PageRequestManager.getInstance()._form;
     form._initialAction = form.action = window.location.href;
 });

I hope this helps.

Greetings,
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
Tags
Ajax
Asked by
Alan T
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or