I want a AnimationExtender to run only once but this code produces a complier error

Discussion in 'ASP .Net' started by Cal Who, Jun 26, 2010.

  1. Cal Who

    Cal Who Guest

    This works OK:

    <ajaxToolkit:AnimationExtender ID="AnimationExtender1" runat="server"
    TargetControlID="TableTopQQ">

    But if the user returns to this page I don't want the animation to run a
    second time.

    So in the Load event I placed:

    CType(FindControlRecursive(Me, "AnimationExtender1"),
    System.Web.UI.Control).Enabled = False

    This got me a "not a member" error so I changed to Visible and ran debug
    with a break point.

    Looking at:

    FindControlRecursive(Me, "AnimationExtender1")

    I see that it does find the element and it has an "Enabled" attribute.

    And the type is: System.Web.UI.Control



    How can I fix this?





    Thanks
    Cal Who, Jun 26, 2010
    #1
    1. Advertising

  2. Cal Who

    Cal Who Guest

    The type I used should have been : AnimationExtender
    That works OK
    Just needed a
    Imports AjaxControlToolkit





    " Cal Who" <> wrote in message
    news:i04vkr$v1g$-september.org...
    > This works OK:
    >
    > <ajaxToolkit:AnimationExtender ID="AnimationExtender1" runat="server"
    > TargetControlID="TableTopQQ">
    >
    > But if the user returns to this page I don't want the animation to run a
    > second time.
    >
    > So in the Load event I placed:
    >
    > CType(FindControlRecursive(Me, "AnimationExtender1"),
    > System.Web.UI.Control).Enabled = False
    >
    > This got me a "not a member" error so I changed to Visible and ran debug
    > with a break point.
    >
    > Looking at:
    >
    > FindControlRecursive(Me, "AnimationExtender1")
    >
    > I see that it does find the element and it has an "Enabled" attribute.
    >
    > And the type is: System.Web.UI.Control
    >
    >
    >
    > How can I fix this?
    >
    >
    >
    >
    >
    > Thanks
    >
    >
    >
    >
    Cal Who, Jun 26, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Balaji
    Replies:
    3
    Views:
    10,093
  2. Bjorn Sagbakken

    Ajax AnimationExtender

    Bjorn Sagbakken, Nov 4, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    424
    Bjorn Sagbakken
    Nov 4, 2007
  3. vcuankitdotnet

    AJAX AnimationExtender

    vcuankitdotnet, Feb 22, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    1,905
    vcuankitdotnet
    Feb 22, 2008
  4. Oltmans
    Replies:
    1
    Views:
    821
    Francesco Bochicchio
    Sep 28, 2009
  5. Andreas.Bretl
    Replies:
    0
    Views:
    151
    Andreas.Bretl
    May 18, 2004
Loading...

Share This Page