Showing posts with label animationextender. Show all posts
Showing posts with label animationextender. Show all posts

Wednesday, March 28, 2012

Postbacks and animationextender / modalpopupextender

I have a usercontrol which handles its own postbacks. I would like to place this usercontrol in a panel, which gets displayed either using the animationextender or the modalpopupextender. The problem is that when a user clicks on any control which fires the postback in the usercontrol, the usercontrol disappears from the page.

Would anyone happen to know how to prevent the target panel of a modalpopupextender or animationextender from disappearing on a postback? Thanks!

Have you gotten anywhere with this problem? I just came across this issue and need to also understand how to properly do this. Thanks.

Monday, March 26, 2012

prevent repeat animation (animationextender)

Hey guys. I have a textbox which will expand when I click it. However, once expanded it's still obviously active and it will replay the animation when I click it again. How can I make the textbox expand (like the example below) when clicked, but then disable further animations of it? I obviously cant disable the textbox. I was thinking a conditionanimation would work but Im not that great with javascript.
<ajaxToolkit:AnimationExtender id="Ani" runat="server" TargetControlID="TextBox1"> <Animations> <OnClick> <Resize width="400px" duration="0.3" fps="10" /> </OnClick> </Animations></ajaxToolkit:AnimationExtender><asp:TextBox ID="TextBox1" Width="200px" TextMode="MultiLine" Rows="6" runat="server" />
Thanks /J

Hi,

Yeah , a conditional animation would be the way to go about this .

Try this Mark-Up ..

<

scriptlanguage="javascript">var expandCount = 1;var expandMaxCount = 1;

function ShouldIExpand()

{

var shouldExpand =false;

if ( expandCount <= expandMaxCount )

shouldExpand =

true;

expandCount++;

return shouldExpand ;

}

</script>

<OnClick>

<ConditionConditionScript="ShouldIExpand()">

<Resize width="400px" duration="0.3" fps="10" /></Condition> </OnClick>

Hope this helps.

If it resolves the issue , please mark my reply as the answer


exactly what i had in mind, it works! ThanksYes