ASP.NET Ajax UpdatePanel with UpdatePanelAnimationExtender

Hi experts,

I'm quite new to UpdatePanels with the UpdatePanelAnimationExtender and despite looking at samples, I cannot achieve what I want.

I have a page which contains:

One UpdatePanel with Search box and Submit button in it.
One UpdatePanelAnimationExtender which uses the TargetControlID of the  UpdatePanel
One ProgressTemplate which displays a "Loading" image

When a user clicks the submit button, I want another panel (which will contain the search results) to appear after the ProgressTemplate completes. Where in my code do I put this panel to make it appear (even better if you can tell me how to make it appear in an animated way).

Thanks

Jon
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
 <ContentTemplate>
     <asp:TextBox ID="TextBox1" runat="server" class="txtBox"></asp:TextBox>
     <asp:Button ID="btnSearch" runat="server" Text="Search" class="button2" />
  </ContentTemplate>
<Triggers>
  <asp:AsyncPostBackTrigger ControlID="btnSearch" /> 
            </Triggers>
            </asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
            <ProgressTemplate>
            <img src="images/loading.gif" alt="" /> Searching, please wait...
            </ProgressTemplate>
            </asp:UpdateProgress>
  <cc1:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" TargetControlID="UpdatePanel1" BehaviorID="UpdatePanel1">
                  <Animations>
                    <OnUpdating>
                    <Sequence>
                        <EnableAction AnimationTarget="btnSearch" enabled="false" duration="0" />
                        <EnableAction AnimationTarget="TextBox1" enabled="false" duration="0" />
                    </Sequence>
                    </OnUpdating>
                    <OnUpdated>
                    <Parallel duration="0">
                        
                     </Parallel>
                    </OnUpdated>
                   </Animations>
                </cc1:UpdatePanelAnimationExtender>

Open in new window

LVL 11
Jon WinterburnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tip_37Commented:
Im sorry I dont know what that is but someone else will help you.
0
robastaCommented:
Make the changes in the highlited section below ( Inside the UpdatePanel)

After processing the btnSearch_Click event,

toggle the panels' visibility.


<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
 <ContentTemplate>
<!--- Modify Section -->
<asp:Panel runt="server" id="pnlSearchForm" visible="true">
     <asp:TextBox ID="TextBox1" runat="server" class="txtBox"></asp:TextBox>
     <asp:Button ID="btnSearch" runat="server" Text="Search" class="button2" />
</asp:Panel>
<asp:Panel runat="server" id="pnlSearchResults" visible="false">
display your results here.....
</asp:Panel
<!-- end modify section -->
  </ContentTemplate>
<Triggers>
  <asp:AsyncPostBackTrigger ControlID="btnSearch" /> 
            </Triggers>
            </asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
            <ProgressTemplate>
            <img src="images/loading.gif" alt="" /> Searching, please wait...
            </ProgressTemplate>
            </asp:UpdateProgress>
  <cc1:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" TargetControlID="UpdatePanel1" BehaviorID="UpdatePanel1">
                  <Animations>
                    <OnUpdating>
                    <Sequence>
                        <EnableAction AnimationTarget="btnSearch" enabled="false" duration="0" />
                        <EnableAction AnimationTarget="TextBox1" enabled="false" duration="0" />
                    </Sequence>
                    </OnUpdating>
                    <OnUpdated>
                    <Parallel duration="0">
                        
                     </Parallel>
                    </OnUpdated>
                   </Animations>
                </cc1:UpdatePanelAnimationExtender>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.