|
-
Jun 19th, 2010, 05:01 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Static Master Page
I have created a master page with a content place holder and the master page contains a flash animation I want to load only once when the site is entered.
In the content place holder I have some navigation links to the various pages I want to load within the master page, and of course the content of the selected page.
My thought was that the master page was static and only loads once? It seems every time I change the content place holder it re loads the master page and starts the flash animation of again!
Is there anything I can do to make the master page load only once?
Thanks in advance.
-
Jun 19th, 2010, 05:48 PM
#2
Frenzied Member
Re: Static Master Page
hey,
can you post some more code about the way you used to load your flash.
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 05:50 PM
#3
Thread Starter
Addicted Member
Re: Static Master Page
Code:
<div id="head">
<object width="477" height="142">
<param name="movie" value="flash/dawnprint.swf">
<embed src="flash/dawnprint.swf" width="477" height="142">
</embed>
</object>
</div>
Here you go
-
Jun 19th, 2010, 06:02 PM
#4
Frenzied Member
Re: Static Master Page
hey,
did you try to place your flash inside UpdatePanel Ajax Extender
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:03 PM
#5
Thread Starter
Addicted Member
Re: Static Master Page
No, I haven't done anything with Ajax as of yet, is that what I need to learn next to be able to accomplish my idea?
-
Jun 19th, 2010, 06:03 PM
#6
Frenzied Member
Re: Static Master Page
if the answer is not,
please add to your page ScriptManager control , and then UpdatePanel then add the content of the flash file
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:04 PM
#7
Frenzied Member
Re: Static Master Page
hey,
there is no more learning, wait a sec i will get you a good link
hold
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:07 PM
#8
Frenzied Member
Re: Static Master Page
hey,
try this
Code:
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="head">
<object width="477" height="142">
<param name="movie" value="flash/dawnprint.swf">
<embed src="flash/dawnprint.swf" width="477" height="142">
</embed>
</object>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:14 PM
#9
Thread Starter
Addicted Member
Re: Static Master Page
I changed my code to reflect yours (thank you for your help btw) but it still reloads the whole master page including the flash each time I navigate the website.
My flash video is only a part of my master page, is there anyway I can just load within the content holder and leave the master page frozen?
-
Jun 19th, 2010, 06:27 PM
#10
Frenzied Member
Re: Static Master Page
ok,
i post the above as i thought it is for a page with out master page, you need to modify it to work for the master,
where you put your flash ???
on the master page ??
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:32 PM
#11
Thread Starter
Addicted Member
Re: Static Master Page
Code:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!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>Dawn Print Ltd</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" media="screen" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="container-page">
<div id="container-head">
<div id="head">
<object width="477" height="142">
<param name="movie" value="flash/dawnprint.swf">
<embed src="flash/dawnprint.swf" width="477" height="142">
</embed>
</object>
</div>
</div>
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</form>
</body>
</html>
That's my master page, hope that helps
-
Jun 19th, 2010, 06:43 PM
#12
Frenzied Member
Re: Static Master Page
Code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
but this will make it looks like this, but this is not really.
try it
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 19th, 2010, 06:50 PM
#13
Thread Starter
Addicted Member
Re: Static Master Page
Sorry to be a complete pain.
I updated my code as shown below to what I think you meant but it doesn't seem to work as of yet.
Did I get something wrong?
Code:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!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>Dawn Print Ltd</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" media="screen" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<div id="container-page">
<div id="container-head">
<div id="head">
<object width="477" height="142">
<param name="movie" value="flash/dawnprint.swf">
<embed src="flash/dawnprint.swf" width="477" height="142">
</embed>
</object>
</div>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</form>
</body>
</html>
-
Jun 19th, 2010, 07:14 PM
#14
Addicted Member
Re: Static Master Page
Try this...
Code:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
Oh by the way, can you indent your code properly, it's kinda hard reading your code
-
Jun 19th, 2010, 07:34 PM
#15
Thread Starter
Addicted Member
Re: Static Master Page
I hope this is better indented? Still new to asp
Still can't get it to work. Going to search for tutorials on scriptmanager and see if I can better understand it. Will get back when I know more so I can resolve the thread
Code:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!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>Dawn Print Ltd</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" media="screen" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
</div>
<div id="container-page">
<div id="container-head">
<div id="head">
<object width="477" height="142">
<param name="movie" value="flash/dawnprint.swf">
<embed src="flash/dawnprint.swf" width="477" height="142">
</embed>
</object>
</div>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</form>
</body>
</html>
-
Jun 19th, 2010, 07:42 PM
#16
Addicted Member
Re: Static Master Page
Yes, it's better now. And also, it has nothing to do with being new in ASP lol 
EDIT: The term you should search for, I think, is AJAX .NET.
-
Jun 19th, 2010, 10:34 PM
#17
Lively Member
Re: Static Master Page
Ive also thoroughly researched how make it so the masterpage content doesnt refresh. The fact if though, every time you redirect to a new content page, its like typing a new url and pressing go. it has to restart. you sometimes dont even see the flicker, newer web browsers are responsible for that. But with a flash movie, it will restart every time.
Update panels and AJAX will only work if you're staying on the same page and doing partial postbacks, which you are not. Here are a few suggestions...
1) Make only 1 page have a masterpage with animated flash, the others would have a masterpage with a stagnant image of the end of the flash movie. that way the movie only restarts when you redirect back to that one page.
2) you can also combine the two masterpages into one and with the use of url parameters, tell the masterpage to show the stagnant image instead of the movie in the pre-render of the code-being in the masterpage...
3) look into iframes, they allow you to load a page inside a page. But there is a lot of criticism for these which i have yet to fully understand why.
4) if youre really good at actionscript in flash then you can code it to not "play" for certain url's (or jump to the last frame)
Last edited by jtm235; Jun 19th, 2010 at 10:43 PM.
-
Jun 19th, 2010, 11:35 PM
#18
Frenzied Member
Re: Static Master Page
hey,
i told you it is not a good way to put the whole page in UpdatePanal
you can use frames, frame will make your upper part looks like static content
and redirect the other part
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 20th, 2010, 05:23 AM
#19
Re: Static Master Page
Hey,
In my opinion, this has nothing to do with using an AJAX update panel, and everything to do with the flash animation itself.
Are you in control of the flash animation? i.e. can you edit it? Can you not make the playing of the animation dependant of a session variable, which you can set the first time the page laods?
Gary
-
Jun 20th, 2010, 05:41 AM
#20
Thread Starter
Addicted Member
Re: Static Master Page
I do have access to my Flash, basically the flash is a small scene that changes to my logo within 8 seconds and then stops (using action script). What I want ideally is that if a user changes from the home page to one of my 4 other pages then the flash continues in the top right corner.
I think I could work out how to make the flash jump to a frame using action script but id love for it to load once regardless of user interaction
-
Jun 20th, 2010, 08:03 AM
#21
Lively Member
Re: Static Master Page
the only way to truly have it load only once is to use IFRAMES. Make the main page with the flash header, and an iframe beneath it, then you can load different pages into the iframe without changing the main url. However i could not suggest this method due to all the bad things I hear about the iframes. Theres also something called a UFRAME which I read is more dynamic in terms of height and width...
look on my previous post, i suggested 3 other methods to accomplish similar effects too
-
Jun 20th, 2010, 08:59 AM
#22
Thread Starter
Addicted Member
Re: Static Master Page
Thank you very much for all the help.
I have rated you for your assistance
-
Jun 20th, 2010, 02:54 PM
#23
Frenzied Member
Re: [RESOLVED] Static Master Page
hay,
so, so what was your final Decision ?
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 21st, 2010, 07:22 AM
#24
Thread Starter
Addicted Member
Re: [RESOLVED] Static Master Page
Resolved this issue using Uframe, works a treat.
Thanks for pointing me in the right direction.
-
Jun 21st, 2010, 07:27 AM
#25
Frenzied Member
Re: [RESOLVED] Static Master Page
 Originally Posted by a5m0d1
Resolved this issue using Uframe, works a treat.
Thanks for pointing me in the right direction.
glad to hear this
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 21st, 2010, 07:32 AM
#26
Addicted Member
Re: [RESOLVED] Static Master Page
Enlighten me please...
What's the difference between frame, iframe, and uframe?
-
Jun 21st, 2010, 07:41 AM
#27
Frenzied Member
Re: [RESOLVED] Static Master Page
 Originally Posted by Claude2005
Enlighten me please...
What's the difference between frame, iframe, and uframe?
hey Claude,
please have a look at this link
http://www.codeproject.com/KB/aspnet...px?msg=3355171
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 21st, 2010, 07:51 AM
#28
Addicted Member
Re: [RESOLVED] Static Master Page
Thanks man for the link
-
Jun 21st, 2010, 07:54 AM
#29
Frenzied Member
Re: [RESOLVED] Static Master Page
 Originally Posted by Claude2005
Thanks man for the link 
you are welcome
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Jun 21st, 2010, 08:25 AM
#30
Re: [RESOLVED] Static Master Page
I have only used an iFrame once, under a very specific set of circumstances, and they are not something that I recommend often.
In your case, I would still suggest that a change to the flash animation is something that you want to look into.
Gary
-
Jun 22nd, 2010, 09:17 AM
#31
Lively Member
Re: [RESOLVED] Static Master Page
 Originally Posted by a5m0d1
Resolved this issue using Uframe, works a treat.
Thanks for pointing me in the right direction.
nice
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|