Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 13th, 2007, 11:39 PM
Authorized User
Points: 239, Level: 4
Points: 239, Level: 4 Points: 239, Level: 4 Points: 239, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2005
Location: , , .
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Masterpage Update Panel Question

Hi and thanks for taking a moment to read this. I have a Masterpage that has a Project Playlist( Like the music players on myspace) in one of the contentplaceholders. What I want to do is eliminate this from doing a postback everytime the page is refreshed. This way songs will play uninterrupted while different pages are browsed to. I try to use ScriptManager with an UpdatePanel in the master page but VS 2005 gives me lots of errors when I try to do this. Is there a way to do this at the Masterpage Level or do I have to rethink my design? Any help would be greatly appreciated. See code below. Thanks- Jason

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<%@ Register TagPrefix="Acme" Tagname="links" Src="links.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Welcome to Jason Livengood.com</title>

</head>

<body background="images/bg.gif">

<form id="form1" runat="server">

&nbsp;





<table bgcolor="white" width="700px" align=center>

<tr>

<td>

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

&nbsp;<img src="images/HeaderBanner2.jpg" /></asp:ContentPlaceHolder>

<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">

<Acme:Links id="links" Runat="Server"/>

</asp:ContentPlaceHolder>



<asp:ContentPlaceHolder ID="MainContent" runat="server">







</asp:ContentPlaceHolder>



</td>

</tr>

</table>


<asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server" >

<table width="700px" align=center>

<tr>


<td align=center><embed style="width:435px; visibility:visible; height:320px;" allowScriptAccess="never" src="http://www.playlistproject.net/mc/mp3player-othersite.swf?config=http://www.playlistproject.net/mc/config/config_black.xml&mywidth=435&myheight=320&playlist _url=http://www.playlistproject.net/loadplaylist.php?playlist=7271862" menu="false" quality="high" width="435" height="320" name="mp3player" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" border="0"/></td>



</tr>

</table>


</asp:ContentPlaceHolder>


</form>

</body>

</html>


  #2 (permalink)  
Old June 14th, 2007, 09:20 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This is a pretty big change.

Generally, the idea of master pages is that you can have many pages (aspx) in your site that all have the same "chrome" around them that is provided by the master page layout. The individual pages just change the contents of the ContentTemplate. You can't make the master page keep anything "static" in the browser unless you completely change your design.

What you would need to do is change the architecture such that instead of many pages (aspx files) you have many controls (ascx files) that act as the pages. You then have a single main page (in this case you don't even need a master page, because you will only load one aspx file). The main page has an update panel in it and as you changes "pages" (controls) you dynamically load the appropriate control into the page body. This is the only way I can imagine meeting your goal. You have to load the master HTML set with the media player in it and then never do a full post back or page reload so you have to do everything with AJAX in an update panel.

-Peter


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update panel in .net 2.0 DIlip Kumar Sittu .NET Framework 2.0 1 July 18th, 2008 06:44 AM
Using AJax Update Panel With Project Playlist jazzcatone ASP.NET 2.0 Professional 1 July 22nd, 2007 12:35 PM
Javascript Update Panel. blink18jew ASP.NET 1.0 and 1.1 Basics 0 June 30th, 2007 06:46 AM
Masterpage Question and Misprint on page 269 stanguss BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 February 24th, 2006 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.