Welcome Guest Search | Active Topics | Sign In | Register

ScriptManager error Options
Duane
Posted: Monday, November 29, 2010 11:33:03 AM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Hello,

We occasionally see the below error reported:


An EO.Web control is rendered after an AJAX callback but there wasn't any EO.Web control on the page before the callback. The AJAX rendered EO.Web control will not function correctly under this situation. To correct this problem, please place an EO.Web ScriptManager outside of the AJAX update panel so that EO.Web client side script is correctly initialized before the AJAX call


I see the reference in your documentation regarding adding the EO.Web ScriptManager to the page in the case as described in the above error message.

We are not sure how this error is being generated. Can you provide a [simple] page example of how the above error might be generated, and how best to use the EO.Web ScriptManager in conjunction with the ASP.NET ScriptManager.

Thanks.
eo_support
Posted: Monday, November 29, 2010 11:43:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

A typical scenario is like this:

Code: HTML/ASPX
<asp:UpdatePanel ....>
    <ContentTemplate>
        <eo:DatePicker Visible="False" ....>
        .....
        </eo:DatePicker>
    </ContentTemplate>
</asp:UpdatePanel>


In this case because the DatePicker is not visible, when the page is initially rendered, it would not render any eo related code at all. However if you then AJAX update the UpdatePanel to set the DatePicker's Visible to true, you will run into the above error because now the page needs to initiate the DatePicker. It is not able to do so because eo code is not hooked up before the AJAX call took place.

Thanks!
Duane
Posted: Monday, November 29, 2010 12:50:42 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Our user reported that the error occurred in the initial page load ( not a postback ). But I can't confirm what actions they may have been taking when the page was loading.

So then, adding the EO.Web ScriptManager to the page would look like this?


Code: HTML/ASPX
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/WebServices/WebServices.asmx" />
        </Services>
    </asp:ScriptManagerProxy>

    <eo:ScriptManager ID="ui_eo_ScriptManager" runat="server" />

         <!-- all the page content here -->

</asp:Content>


Does this look correct?

Thanks.
eo_support
Posted: Monday, November 29, 2010 2:08:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. That looks correct.

Thanks!
Duane
Posted: Monday, November 29, 2010 4:16:08 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Ok, thanks for the info.

In this situation, the error is being generated in the initial Page_Load, not post back.
The only EO controls on the page, are [several] Dialog controls. None of which have Visibility explicitly set to false. I cannot reproduce the error condition, and it is only occasionally reported.

You are saying that only an EO control (acting as script manager), or the EO ScriptManager itself can render the EO.Web controls. The ASP.NET ScriptManager does NOT load and render the EO controls. Is this correct?

Thanks
eo_support
Posted: Monday, November 29, 2010 4:21:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It does not make any sense the error occurs during initial load, unless you have triggered something on the client side when the page loads. In any case, we do need a reproducing test page in order to investigate further.

The basic rule is EO control can not be AJAX loaded unless eo script is already being loaded BEFORE the AJAX call. In another word, EO must join the party from the very beginning in order to function correctly. You can not pull it out in the middle of the party.

Thanks!
Duane
Posted: Monday, November 29, 2010 5:19:39 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
I understand. A complete page to reproduce is not likely as the page in question is quite large.

I am calling some javascript from the client side page load:


Code: JavaScript
Sys.Application.add_load(page_load);

        function page_load() {
            getNewListItems();
            Sys.Application.remove_load(page_load);
        }


The getNewListItems() function calls a web service to load a dropdownlist with options. then, the page_load is removed to prevent subsequent postback calls from executing again.

Does the trace below gives you any clues as to the source of the issue?


Trace: at EO.Web.Internal.fw.a(bv A_0, Boolean A_1, Boolean A_2, HtmlTextWriter A_3, String A_4, String A_5, String A_6, String A_7) at EO.Web.Internal.jm.a(HtmlTextWriter A_0) at EO.Web.Internal.jm.b(HtmlTextWriter A_0) at EO.Web.Dialog.c(HtmlTextWriter A_0) at EO.Web.Dialog.b(HtmlTextWriter A_0) at EO.Web.WebControlBase.o(HtmlTextWriter A_0) at EO.Web.WebControlBase.a(HtmlTextWriter A_0) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.mackinonline_listdetails_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at ASP.masterpages_masterpages_master.__RendermasterBody(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
eo_support
Posted: Monday, November 29, 2010 5:26:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We won't be able to look further unless you can isolate the problem into a test page. The reason is we must have a test case in order to verify whatever solution that we come up works for you. We don't work on can you try this can you try that for 100 times mode. You must provide a case, we work on it, test and verify it then close it.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.