views:

138

answers:

0

Hi everyone, I'm having trouble using an updatepanel within a page that contains a video object (either WMP or silverlight). I'm not sure I understand how updatepanel works to do a partial update because I'm not getting the results I want.

My page has 2 usercontrols, one for the video and one for a "notes" panel. They are both inside their own updatepanels, and both get a variety of variables set from the database when they are loaded. When I want to update just the notes panel, it looks like it's doing a full refresh, which restarts the video. How can I fix this?

Here is some of my (simplified) code:

notes.ascx:

<asp:Button ID="trigger" runat="server" OnClick="TriggerClick" Text="test" />
<asp:UpdatePanel runat="server" ID="Panel" UpdateMode="Conditional">
<ContentTemplate>    
    ...
</ContentTemplate>
<Triggers>
   <asp:AsyncPostBackTrigger ControlID="trigger" EventName="Click" />
</Triggers>
</asp:UpdatePanel>

player.aspx.cs:

protected override void OnLoad(System.EventArgs e)
    {
        base.OnLoad(e);
        ...          
        VideoPlayer.videoUrl = videoUrl;
        VideoPlayer.contentType = GetContentType();
        ...
        DisplayNotes();
    }