Ajax Manager and different declaration ASCX problem

5 posts, 1 answers
  1. Lasly
    Lasly avatar
    115 posts
    Member since:
    Nov 2009

    Posted 09 Jan 2012 Link to this post

    Hi everybody,

    I've a page where I call one ASCX twice.

    This the page code:

    <%@ Register TagPrefix="Ricerca" TagName="Anagrafica" Src="~/PopUp/PUucRicercaAnagrafica.ascx" %>
    <!-- some controls -->
      
    <!-- ascx -->
                <Ricerca:Anagrafica ID="datiContrattoRicercaAnagraficaInsertFornitore" runat="server"
                    AllowMultiRowSelect="false" Titolo="Ricerca Fornitore" RadWindowObjectListKey="rwPopUpRicercaAnagraficaFornitore"
                    ParentObjectClientId="ClientID" OnInitializeComponentComplete="RicercaAnagrafica_InitializeComponentComplete"
                    OnConfermaRicercaClicked="RicercaAnagrafica_ConfermaRicercaClicked" OnConfermaRicercaClicking="RicercaAnagrafica_ConfermaRicercaClicking" />
                <Ricerca:Anagrafica ID="datiContrattoRicercaAnagraficaInsertRichiedente" runat="server"
                    AllowMultiRowSelect="false" Titolo="Ricerca Richiedente" RadWindowObjectListKey="rwPopUpRicercaAnagraficaRichiedente"
                    OnInitializeComponentComplete="RicercaAnagrafica_InitializeComponentComplete" />

    I need to use the same ascx two different purpose, so I call the same ascx using different ID, and this is correct, but when I'm going to use ajax the async postback doesn't work for all ascx, but only for last declared.

    In my ascx I've RadAjaxMangerProxy, which refresh the ascx controls.
    In my aspx I've RadAjaxManager, when I'm going to do a postback from usercontrol, the radajaxmanager doesn't intercept the postback, so the page totally refreshes.

    Perhaps the problem is the name of the controls into ascx, when the radajaxmanager register the control override all control with the same ID (server ID), but is not functionally, because it's possible declare different ascx control in the same page, e.g. template.

    How can I solve this?

    Thanks

  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 11 Jan 2012 Link to this post

    Hi Lasly,

    I have assembled a sample project demonstrating similar functionality for your guidance. If your problem persists you could send us the pages declaration and any related code behind from your project.

    Kind regards,
    Antonio Stoilkov
    the Telerik team
    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 their blog feed now
  3. Lasly
    Lasly avatar
    115 posts
    Member since:
    Nov 2009

    Posted 11 Jan 2012 Link to this post

    Thanks for the reply.
    Your example works.

    I read your code and I note that you are using RadScriptManager instead of ScriptManager (ASP.NET), I tried to change my page using Telerik Script Manager control, but it doesn't change anything.

    My application web is more complex of this scenario.
    It's divided in MODULES.

    I've a Main MasterPage with:

    a. ScriptManager

    b. RadAjaxManager
    c. RadAjaxLoadingPanel

    I've a MasterPage child for each module, which calls the main MasterPage.
    I've ASPX child which calls the child master page.

    In the aspx I'm using RadTabStrip control to load at runtime different ASCX, and into the ascx I'm able to use another ASCX (e.g. ascx for research, or summary, created as template).

    Each of this template ascx is displayed into a RadWindow and into ascx I've own RadAjaxManagerProxy which refreshes the relative controls.

    I've found the problem some time ago with RadAjaxPanel, I've noted that if the RadAjaxPanel in different ASCX have the same ID, the ajax request doesn't work, I've solved this renaming the RadAjaxPanel.

    Now I cannot rename the controls in the ascx, because are template.
    The problem can be caused by the RadPageView that include each ascx with the ascx "popup".

    I'm sorry but I can't send to you an example, because the scenario is too complex to be reproduced in a more simple solution.

    Thanks in advance.
  4. Lasly
    Lasly avatar
    115 posts
    Member since:
    Nov 2009

    Posted 12 Jan 2012 Link to this post

    Maybe I found the problem.

    I've done a simple web site which use RadTab and MultiPageView.
    I've created two pages:
     1. UserControls.aspx: loads usercontrol into radpageview using OnPageViewCreated event at runtime
     2. UserControlsStatic.aspx: here reigister usercontrol and add this statically in aspx page


    The second page works, the first doesn't work, only the first page view do an async postback.

    Sorry but how can I send you zip file with the example?

    Thanks

  5. Answer
    Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 12 Jan 2012 Link to this post

    Hello Lasly,

    To be able to send us a zip file you should submit a support ticket from your Client.NET account and attach the problematic application there. We will debug it locally and get back to you with our findings.

    All the best,
    Antonio Stoilkov
    the Telerik team
    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 their blog feed now
Back to Top