RadAjax Architecture Questions

2 posts, 0 answers
  1. Carl
    Carl avatar
    16 posts
    Member since:
    Mar 2009

    Posted 02 Dec 2009 Link to this post

    I have JavaScript based Gantt Chart that is built on the client when the page loads from an initialization script that was built on the server. For version 1, my client has elected to first update the chart by making Ajax calls to the server and let the return script completely rebuild the chart while leaving the rest of the page alone. Eventually the chart will be modified on the client with only data changes being sent to the server via Ajax.

    I have done a lot of JavaScript using hte XMLHTTPRequest object. So I am familiar with this part of the plumbing.

    The web page with the Gantt chart will have other content built from calls to the DB layer. We want this and any associated Viewstate left completely alone and we don't want to do any normal PostBack processing during the Ajax call such has hitting the DB layer again for anything other than Gantt related issues.

    The Ajax call will be initiated by Gantt chart client method using RadAjaxManager.ajaxRequest(AjaxDataToServer).

    1. During the server side processing, should we use RadAjaxManager.isAjaxRequest to pretty much prevent any other processing not needed for the Ajax call?
    2. In reading the Telerik documentation, it appears that the XML response due to the Ajax call is all that is returned to the client and not any of the normal page content that is normally built during a Page Cycle. Is this correct and with an overview type of reply, how is the normal page content suppressed? Is there a more formal and descriptive document that gives a more detailed explanation other than what I have seen under the help documentation entitled "What is AJAX?"
    3. When using my own JavaScript libraries using the XMLHTTPRequest object, I often post to a different url that is entirely devoted to processing Ajax calls. This can be pretty handy when I have processing that is exactly common to many pages and so there is no need for any isAjaxRequest type of related processing - write once, use many times. Using the approach of Teleriik, It appears that it is not possible to change the url of the Ajax call away from the current page url. Is this true?
    4. It appears that a JavaScript eval(...) is executed by any script returned by server using RadAjaxManagerOrTelerikControl.ResponseScripts.Add(script). Is this true? 

    BTW - I am absolutely delighted with your product

    Have a nice day,
    Carl Taylor
    Suwanee, GA USA

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 08 Dec 2009 Link to this post

    Hello Carl,

    RadControls for ASP.NET AJAX are build on the top of MS ASP.NET AJAX framework. RadAjaxManager/RadAjaxPanel utilize MS UpdatePanels to perform ajax requests to server. By default UpdateMode property of the used UpdatePanels is set to Conditional that instructs ajax framework to perform partial updates on client page. However on the server every request goes through the whole page life cycle as regular postback. You can find more information of how UpdatePanel functions bellow:
    http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.updatemode.aspx

    Straight to your questions:
     1. Yes you can use isAjaxRequest to determine whether async request is currently performing.
     2. As RadAjax utilize UpdatePanels - gathering the content to be send to server is generally managed by PageRequestManager on client side: http://msdn.microsoft.com/en-us/library/bb311028.aspx
     3. No you cannot change the url - it is always performed against the current page.
     4. RadAjaxManager/RadAjaxPanel use internally ScriptManager.RegisterStartupScript to register all scripts that have been added into ResponseScripts collection.

    Best wishes,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top