UpdatePanelAnimationExtender and Repeaters

Last post 02-16-2007 2:21 PM by Ted Glaza [MSFT]. 1 replies.

Sort Posts:

  • Tongue Tied [:S] UpdatePanelAnimationExtender and Repeaters

    02-11-2007, 5:04 AM
    • Loading...
    • minimaximus
    • Joined on 01-11-2006, 12:30 AM
    • Posts 6

    Hi,

    I couldn't find an answer to this one anywhere.  Basically, I have an UpdatePanel inside a Repeater control's ItemTemplate, and the ItemTemplate contains a LinkButton.  The UpdatePanel works just fine.  However, when I add an UpdatePanelAnimationExtender with Color animation nothing happens.  The animation never shows up.  I also tried adding the control in the codebehind (specifically the ItemCommand event) and provided the e.Item.FindControl("btn").UniqueID as the AnimationTarget, but that didn't work either.  Please help.

     

    <

    asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

     

    <asp:Repeater ID="rpt" runat="server" OnItemCommand="cmd" Visible="true">

    <ItemTemplate>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <asp:LinkButton ID="btn" runat="server" Height="37px" CommandName="mybutton" Style="position: relative">1</asp:LinkButton>

    </ContentTemplate>

    </asp:UpdatePanel>

    <cc1:UpdatePanelAnimationExtender ID="upax" runat="server" BehaviorID="animation" TargetControlID="UpdatePanel1">

    <Animations>

    <OnUpdating>

    <Color AnimationTarget="btn" PropertyKey="backgroundColor" Duration="1.5" Fps="24" EndValue="#990000"></Color>

    </OnUpdating>

    </Animations>

    </cc1:UpdatePanelAnimationExtender>

    </ItemTemplate>

    </asp:Repeater>

     

    or, in the code-behind:

    protected

    void rpt_ItemCommand(object source, RepeaterCommandEventArgs e)

    {

    HyperLink

     btn = (HyperLink)e.Item.FindControl("btn");

    UpdatePanel up = (UpdatePanel)e.Item.FindControl("UpdatePanel1");

    AjaxControlToolkit.

    UpdatePanelAnimationExtender ace = new AjaxControlToolkit.UpdatePanelAnimationExtender();

    ace.TargetControlID = up.UniqueID ;

    ace.Animations =

    "<OnUpdated><Color AnimationTarget='" + btn.UniqueID + "' Duration=\"1.5\" Fps=\"24\" EndValue=\"#99000\" /></OnUpdated>";

    Page.Controls.AddAt(0, ace);

    }

     

    neither of these methods work...

     

    Filed under: ,
  • Re: UpdatePanelAnimationExtender and Repeaters

    02-16-2007, 2:21 PM

    Hi,

    AnimationTarget is expecting the ClientID.  I'd try that instead.

    Thanks,
    Ted

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter