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

URL rewrite, RadAjaxPanel exception

4 Answers 57 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Entegral
Top achievements
Rank 1
Entegral asked on 06 Jun 2014, 12:17 PM
Hi guys,

having an issue with the RadAjaxPanel when being used on a page with a URL rewrite, when accessing the page on the normal URL there is no error and the panel updates just fine. example:
  • page.aspx?id=1 (this works)
  • /custum/url/1  - which rewrites to page.aspx?id=1 (this does not work)

I am using "urlrewriter.net" (http://urlrewriter.net/). 

Code for page:

01.<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
02.                    <AjaxSettings>
03.                        <telerik:AjaxSetting AjaxControlID="sndButton">
04.                            <UpdatedControls>
05.                                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>
06.                            </UpdatedControls>
07.                        </telerik:AjaxSetting>
08.                    </AjaxSettings>
09.                </telerik:RadAjaxManager>
10. 
11.                <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="1">
12.                </telerik:RadAjaxLoadingPanel>
13. 
14.                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
15. 
16.                    <asp:Label runat="server" ID="lbl" Text="time"></asp:Label>
17.                     
18.                </telerik:RadAjaxPanel>
19.                <asp:Button ID="sndButton" runat="server" Text="Send" OnClick="sndButton_Click" />

and backend code:
1.Protected Sub sndButton_Click(sender As Object, e As EventArgs)
2.    lbl.Text = Date.Now
3.End Sub

My conclusion is that the rewriter and the panel is clashing somehow. Is there any way to fix this or work around it?

Thanks in advance.


4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Jun 2014, 07:52 AM
Hi Adriaan,

Could you please test the same scenario with regular asp UpdatePanel instead of RadAjaxPanel and verify what the result in this case is?

I would suggest you to 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;
 });


Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Entegral
Top achievements
Rank 1
answered on 13 Jun 2014, 01:36 PM
Hi your function definitely helped: it is reaching my back-end code now, but is taking about 13 seconds to get there. Any ideas? Is there any way I can give you a live URL that you can test on? Obviously without posting it here in the forum.

Regards
0
Entegral
Top achievements
Rank 1
answered on 13 Jun 2014, 01:57 PM
Now testing on live it takes about 2-3 seconds to reach back-end code. Will continue testing, and post again if problem arises again. Thanks for the help thus far. 
0
Maria Ilieva
Telerik team
answered on 18 Jun 2014, 12:26 PM
Hi Adriaan,

I'm glad that the solution provided help in some point. In case further assistance on this case is needed I would encourage you to open a regular support ticket and send us the additional private information there so that we could further investigate the issue.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Ajax
Asked by
Entegral
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Entegral
Top achievements
Rank 1
Share this question
or