UpdateControls: UpdateHistory and AnimatedUpdatePanel
- Posted: Feb 05, 2007 at 12:28 PM
- 20,385 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Does this just inherit from System.Web.UI.UpdatePanel?
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>
</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.
Remove this comment
Remove this thread
close