Composite control alternating full/partial postback

4 posts, 0 answers
  1. KK60
    KK60 avatar
    12 posts
    Member since:
    Apr 2010

    Posted 11 Nov 2013 Link to this post

    I've built an ASP.NET composite control which includes several asp label controls, two textbox controls and a button control.  The composite control functions perfectly - without having any of the above controls ajaxified - in a parent page that already has a RadAjaxManager.

    Now I want to ajaxify the composite control. I followed the various examples and sample code, but no matter which way I arrange the code, when I ajaxify the the button, two text boxes and a label in the composite control and click the button, I always get alternating full postback and asynchronous (partial) postback. (So I get the effect I want every other button click.)

    // in CreateChildControls I added:

                RadAjaxManager objTelerikAjaxManager = RadAjaxManager.GetCurrent(Page);
                if (objTelerikAjaxManager == null)
                {
                    objTelerikAjaxManager = new RadAjaxManager();
                    objTelerikAjaxManager.ID = "RadAjaxManager1";
                    Controls.Add(objTelerikAjaxManager);
                }
                .
                .

                // create controls and add to collection, then:
                .
                .

                objTelerikAjaxManager.AjaxSettings.AddAjaxSetting(objFELoginControlButtonLogin, objFELoginControlButtonLogin);
                objTelerikAjaxManager.AjaxSettings.AddAjaxSetting(objFELoginControlButtonLogin, objFELoginControlLabelMessage);
                objTelerikAjaxManager.AjaxSettings.AddAjaxSetting(objFELoginControlButtonLogin, objFELoginControlTextBoxUser);
                objTelerikAjaxManager.AjaxSettings.AddAjaxSetting(objFELoginControlButtonLogin, objFELoginControlTextBoxAppID);

    What am I missing and what should I check?  Is there an alternative recommendation for placing the above code blocks?

    Thanks

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 14 Nov 2013 Link to this post

    Hi Carmen,

    Could you please ensure that you have a RadScriptManager or a  asp ScriptManager control on the very top of the content page before the RadAjaxManager declaration?

    Regards,
    Maria Ilieva
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. KK60
    KK60 avatar
    12 posts
    Member since:
    Apr 2010

    Posted 14 Nov 2013 Link to this post

    All of the aspx pages that will use the composite control have the items you mentioned in the <body> and are laid out like this:

    <body onload="maximizeWindow();">

      <form id="formAdminLogin" runat="server">

      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

        <Scripts>

          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />

        </Scripts>

      </telerik:RadScriptManager>

      <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Web20" ></telerik:RadSkinManager>

      <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Web20"/>

      <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"></telerik:RadCodeBlock>

      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>

      <cc1:OurControl ID="OurControl1" runat="server" ParentName="Administration" Version="Not Set" Message=""></cc1:OurControl>

      </form>

    </body>

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Nov 2013 Link to this post

    Hello Frank,

    Could I kindly ask you to open a regular support ticket and send us sample runnable application which demonstrates the problematic behavior? The approach you are suing looks correct to me , so we will need to debug your application on our end and isolate the root cause of the issue.

    Regards,
    Maria Ilieva
    Telerik
    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 the blog feed now.
Back to Top