Loading external URL into a RadPane (with AJAX)

4 posts, 0 answers
  1. Ville
    Ville avatar
    5 posts
    Member since:
    Oct 2008

    Posted 17 Jun 2009 Link to this post

    Hello all,

    I am trying to update the ContentUrl of a RadPane with ajax, however without any success yet. I found an article that mentioned that if I want to ajaxify a RadPane, I should wrap its contents inside a normal asp:panel or similar. However, this doesn't allow me to update the ContentUrl property. The RadPane should host a XBAP application. How this kind of behaviour could be implemented?

    Any help is appreciated!

    Best regards,
    Ville
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Jun 2009 Link to this post

    Hi Ville,

    I am not sure about your exact scenario and why you need to change the content url through AJAX - it is better to do so on the client through javascript and this will prevent not only a postback but also a trip to the server.

    You have correctly noticed that when you want to update the content of a RadPane with AJAX you should wrap it in a panel and update the panel. However, this is teh case when you have internal content in teh pane. When you specify a ContentUrl, the RadPane creates an IFRAME element in which to load the external page in it and that is why the panel solution will not work. If you want to keep your setup, I suggest to remove the panel and to try updating the whole splitter.

    On a side note, I recommend to use the RadPane's client-side API to get the desired result - all you should do is to reference the particular RadPane and to pass the desired url to its set_contentUrl method which is listed below:

    http://www.telerik.com/help/aspnet-ajax/splitter_clientsideradpane.html 

    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ville
    Ville avatar
    5 posts
    Member since:
    Oct 2008

    Posted 19 Jun 2009 Link to this post

    Hi Svetlina,

    Thanks for your prompt reply and explanation.

    The reason why I am using AJAX to update the radPane is because the client does not know the exact URL where to go before checking the database for details. The setup is a combination of RadSplitter and RadScheduler, after clicking the appointment I should update another content to the RadPane below the scheduler.

    However, a quick (and a bit dirty) workaround could be redirecting the user to a static URL (and maybe a generic handler) that redirects the user to the correct and final url.

    Best regards,
    Ville
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Jun 2009 Link to this post

    Hi Ville,

    Yes, this solution should work. Another possibility is to define a javascript function in the markup which takes the url as an argument and sets it to teh RadPane. After you get the url on the server, you can execute the javascript from the server in one of the standard manners of executing scripts from the server in ASP.NET - a blog post about this is available below:

    http://blogs.telerik.com/supportdept/posts/09-05-05/executing_javascript_function_from_server-side_code.aspx

    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top