NikhilKothari

UpdateControls: UpdateHistory and AnimatedUpdatePanel

Download this episode

Download Video

Description

This video goes along with my blog post, http://www.nikhilk.net/UpdateControls.aspx (which will be posted shortly).

Specifically, this video demonstrates two controls in action: UpdateHistory and AnimatedUpdatePanel. Both work well with the UpdatePanel and partial rendering feature in ASP.NET AJAX.

UpdateHistory enables back button support. AnimatedUpdatePanel allows visually appealing subtle transitions when page content is updated. For more details, check out the blog post...

Nikhil

Tags:

Ajax, ASP.NET

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • Cyonix
      Please fix it so it will work with master pages Smiley
    • Dmorgan
      This screencast appears to have no audio. I tried to play it twice with the same results. The info contained seems like it would of interest if there were an audio track.
    • evanreiser
      Really Cool.

      Does this just inherit from System.Web.UI.UpdatePanel?
    • wsyeager36

      There is no audio for this video...

      I tried using the UpdateHistory control, but it didn't work.

      The e.EntryName object had an empty string value.

      I just had a simple default.aspx page and page2.aspx page with two controls. A textbox and Button on Default.aspx and page2.aspx had a textbox.

      When going to page2, the value was in the textbox. When going back to default.aspx (via the Back button in the browser), the form data value originally in this page was gone.

      See my below code:

      <form id="form1" runat="server">
              <asp:ScriptManager ID="ScriptManager1" runat="server" />
              <nStuff:UpdateHistory ID="UpdateHistory1" runat="server" OnNavigate="OnUpdateHistoryNavigate">
              </nStuff:UpdateHistory>
              <nStuff:AnimatedUpdatePanel ID="AnimatedUpdatePanel1" runat="server" UpdateMode="Conditional">
                  <ContentTemplate>
                          <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                      <br />
                          <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
                  </ContentTemplate>
              </nStuff:AnimatedUpdatePanel>
              <div>
                  &nbsp;&nbsp;</div>
          </form>

      private Sub OnUpdateHistoryNavigate(ByVal sender As Object, ByVal e As HistoryEventArgs)
              ' Raised when the user navigates back/forward or
              ' loads a bookmark to a specific view.

              ' Use the history entry name to determine the
              ' selected index and update the page.
              If String.IsNullOrEmpty(e.EntryName) = False Then
                  TextBox1.Text = e.EntryName.ToString
              End If

              AnimatedUpdatePanel1.Update()

          End Sub

      Another point... If you do help me to get it to work, wouldn't I have to run a similiar "If" statement for EACH control on the page in order to repopulate the data? If this is the case, it seems awfully arduous and tedious to do this. It probably won't be feasible with all the controls that can exist on a page.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.