Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Berdia 45 posts 67 karma points
    Oct 24, 2011 @ 23:34
    Berdia
    0

    Updatepanel not working in Umbraco.

    Hi,

    I am using Umbraco 4.7.1. and .ascx control in it where I have Updatepanel control. If I use it in Visual Studio Updatepanel works fine. When I move it to Umbraco it does full post back and Updatepanel does not work.

    I am working in .NET 4.0. I have ScriptManager control in Master page.

    Could somebody tell me why Updatepanel control does not work? Is there an issue with Umbraco and AJAX compatibility?

     

    Thank you.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 24, 2011 @ 23:37
    Jan Skovgaard
    0

    Hi Berdia

    Do you get any errors when you insert the user control in Umbraco?

    And how are you inserting it in Umbraco? Is it wrapped in a macro and placed directly on a template or is it inserted in a rich text editor?

    Please ellaborate a bit more so that it will be easier to help you out :)

    /Jan

  • Berdia 45 posts 67 karma points
    Oct 24, 2011 @ 23:59
    Berdia
    0

    Hi Jan,

    I don't get any errors. It works fine. .ascx control has GridView in it which is connected to SQL DB and inserting values. Everything works fine. It is just a postback which is triggered everytime I insert new values insted of smooth transition which should be working using Updatecontrol.

    User control is wrapped in Macro.

    Thank you.

     

    Berdia

     

  • Rodion Novoselov 694 posts 859 karma points
    Oct 25, 2011 @ 00:31
    Rodion Novoselov
    0

    Hi. Perhaps for some reason the particular control that causes a postback in your case just isn't treated as an AsyncPostbackTrigger? There're several properties of an update panel that control this behaviour - e.g. the 'ChildAsTriggers' property and the 'Triggers' collection.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 25, 2011 @ 08:19
    Jan Skovgaard
    0

    Hi Berdia

    Do you have multiple forms in your site? Or is your user control form contained within a serverside form, which encapsulates the whole page?

    In other words...do you have <form runat="server">All content here...</form> in your template?

    /Jan

  • Berdia 45 posts 67 karma points
    Oct 25, 2011 @ 15:57
    Berdia
    0

    Hi Jan,

    I am using <form runat="server">all content</form> in my master page. As for page where I have .ascx control I have following:

    <asp:Content ContentPlaceHolderID="cp_top" runat="server">


    <umbraco:Macro Alias="Rooms" runat="server" />

    </asp:Content>

    Berdia

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 25, 2011 @ 22:31
    Jan Skovgaard
    0

    Hi Berdia

    Try placing your macro outside the server side form on your template. Does it work then?

    /Jan

  • Berdia 45 posts 67 karma points
    Oct 25, 2011 @ 23:26
    Berdia
    0

    I tried that. It gives me this error if I remove <form> tag from master page:

    Control 'ContentPlaceHolderDefault_ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 25, 2011 @ 23:29
    Jan Skovgaard
    0

    Hi Berdia

    Ah yes, I guess that makes sense.

    But do you have other forms on your website beside the one you're trying to insert now?

    /Jan

  • Berdia 45 posts 67 karma points
    Oct 25, 2011 @ 23:38
    Berdia
    0

    Hi Jan,

    I will have similar pages with other .ascx controls and updatepanels. This one is the first where I use updatepanel, if that's what you mean in your question.

     

    Thank you.

  • Rodion Novoselov 694 posts 859 karma points
    Oct 25, 2011 @ 23:44
    Rodion Novoselov
    0

    Berdia, am I right: a) you have a <form runat="server">, b) you have an update panel inside this form, c) you have an <umbraco:Macro> control inside this update panel that (the macro) is bound to an .ascx control that contains a control (e.g. a button) that causes a postback, right?

  • Berdia 45 posts 67 karma points
    Oct 27, 2011 @ 19:25
    Berdia
    0

    Yes, that is right.

  • Rodion Novoselov 694 posts 859 karma points
    Oct 27, 2011 @ 19:53
    Rodion Novoselov
    0

    I've tried it and it worked in such a scenario. I still suspect that you have something wrong with your script manager or update panel settings. You need to make sure that your script manager has EnablePartialRendering="true" and your update panel has ChildrenAsTrigger="true" (they're all default values, but perhaps some is overwritten to another value).

Please Sign in or register to post replies

Write your reply to:

Draft