RadAjaxManager and DNN philosophy

6 posts, 0 answers
  1. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 20 May 2008 Link to this post

    Hi..

    I'm migrating my old modules to new version with new telerik ajax controls and I need some advices how to do it best.
    At the moment I have radajaxmanager embedded in skin (skin is always one per page, so this doesnt make any problems).
    Now the problem, the typicall situation in my modules:

    a) users press button and in client or server side I display radconfirm
    b) if user presses yes ajaxrequest is made to call server side code,
    c) server side code is executed and it displays radalert with notifaction or response.redirect is made to back to main screen.

    How to do it best with new ajax controls? How to use radajaxmanager and radajaxproxy?

    Thanks for all info
    Regards

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 20 May 2008 Link to this post

    Hi tspossible,

    Reading about your scenario, I do not find any changes that are needed to migrate this from the code you've used with the Classic version. Have you hit any problems and what is bothering you?

    Best wishes,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 20 May 2008 Link to this post

    Hi,

    I have two main problems..
    a) client-side ajaxReqest.. how to determine which module have to be updated? i have to add ajaxManager as AjaxControlID in ajaxsettings and every pane as updatecontrols but this is not a good solution

    b) I have embedded links to css files in my modules
    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
        <link href="<%= BizPlatform.Utilities.Common.GetCSSName(PortalSettings.HomeDirectory,"WorkTime") %>" type="text/css" rel="stylesheet" />

    And when i try to update it content via ajaxmanager i get such exception..

    The script tag registered for type 'System.Web.UI.Page' and key 'dnn$ctr374$EditProjects$ctl00' has invalid characters outside of the script tags: <link href="/biz/Portals/0/Projects/skin.css" type="text/css" rel="stylesheet" />
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 May 2008 Link to this post

    Hi,

    Please review the following post, which elaborates on this matter. Check the posted information and let us know if this helps.

    Best wishes,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 24 May 2008 Link to this post

    Hi,

    No, this post doesnt have anything common with my problem. I'll ask again with more precise question.
    Assume that I have 2 modules
    - Module A: where I use ajaxRequest from client side,
    - Module B: where I also use ajaxReqest from client side.

    Now, when I call ajaxRequest from Module A i want only to update body of this module, not the whole page. How to setup ajaxSettings? Becouse the updatecontrol is always ajaxManager and thats the problem.

    Regards
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 27 May 2008 Link to this post

    Hi tspossible,

    In order to update only the controls in the particular module, you should wrap them in a container and add this container in the RadAjaxManager settings.

    Here is a sample example how you could proceed with the AjaxRequest:
    <script runat="server"
     
        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        { 
            if (e.Argument == Button1.ClientID) 
            { 
                RadAjaxManager1.AjaxSettings[0].UpdatedControls[0].ControlID = Label1.UniqueID; 
                RadAjaxManager1.AjaxSettings[0].UpdatedControls[1].ControlID = ""
            } 
            else if (e.Argument == Button2.ClientID) 
            { 
                RadAjaxManager1.AjaxSettings[0].UpdatedControls[0].ControlID = ""
                RadAjaxManager1.AjaxSettings[0].UpdatedControls[1].ControlID = Label2.UniqueID; 
            } 
     
            Label1.Text = Label2.Text = DateTime.Now.ToString(); 
        } 
    </script> 
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title>Untitled Page</title> 
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
     
            <script type="text/javascript"
            function ajaxRequest(id) 
            { 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(id); 
            } 
            </script> 
     
        </telerik:RadCodeBlock> 
    </head> 
    <body> 
        <form id="form1" runat="server"
            <div> 
                <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                                <telerik:AjaxUpdatedControl ControlID="Label2" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 
                <asp:Button ID="Button1" runat="server" OnClientClick="ajaxRequest(this.id); return false;" 
                    Text="Button1" /> 
                <asp:Button ID="Button2" runat="server" OnClientClick="ajaxRequest(this.id); return false;" 
                    Text="Button2" /> 
                <asp:Label ID="Label1" runat="server"></asp:Label> 
                <asp:Label ID="Label2" runat="server"></asp:Label> 
            </div> 
        </form> 
    </body> 
    </html> 
     



    Greetings,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017