Results 1 to 31 of 31

Thread: [RESOLVED] Static Master Page

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    Resolved [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.

  2. #2
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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

  4. #4
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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?

  6. #6
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  7. #7
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  8. #8
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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?

  10. #10
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    Re: Static Master Page

    Code:
    <&#37;@ 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

  12. #12
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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:
    <&#37;@ 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>

  14. #14
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    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
    If a post was helpful to you in any way, rate it. If your problem/question has already been solved/answered, remember to mark your thread as resolved.

    Useful Tools: C# to VB Converter
    Tutorial Sites: W3Schools|ASP.Net|ASP.Net QuickStart|LearnVisualStudio.Net

    So many things to learn, so little time... >_<

    Under Construction...

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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>

  16. #16
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    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.
    If a post was helpful to you in any way, rate it. If your problem/question has already been solved/answered, remember to mark your thread as resolved.

    Useful Tools: C# to VB Converter
    Tutorial Sites: W3Schools|ASP.Net|ASP.Net QuickStart|LearnVisualStudio.Net

    So many things to learn, so little time... >_<

    Under Construction...

  17. #17
    Lively Member
    Join Date
    Dec 2009
    Posts
    116

    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.

  18. #18
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  19. #19
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  20. #20

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    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

  21. #21
    Lively Member
    Join Date
    Dec 2009
    Posts
    116

    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

  22. #22

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    Re: Static Master Page

    Thank you very much for all the help.
    I have rated you for your assistance

  23. #23
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  24. #24

    Thread Starter
    Addicted Member
    Join Date
    Feb 2010
    Posts
    156

    Re: [RESOLVED] Static Master Page

    Resolved this issue using Uframe, works a treat.
    Thanks for pointing me in the right direction.

  25. #25
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: [RESOLVED] Static Master Page

    Quote Originally Posted by a5m0d1 View Post
    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

  26. #26
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    Re: [RESOLVED] Static Master Page

    Enlighten me please...

    What's the difference between frame, iframe, and uframe?
    If a post was helpful to you in any way, rate it. If your problem/question has already been solved/answered, remember to mark your thread as resolved.

    Useful Tools: C# to VB Converter
    Tutorial Sites: W3Schools|ASP.Net|ASP.Net QuickStart|LearnVisualStudio.Net

    So many things to learn, so little time... >_<

    Under Construction...

  27. #27
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: [RESOLVED] Static Master Page

    Quote Originally Posted by Claude2005 View Post
    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

  28. #28
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    Re: [RESOLVED] Static Master Page

    Thanks man for the link
    If a post was helpful to you in any way, rate it. If your problem/question has already been solved/answered, remember to mark your thread as resolved.

    Useful Tools: C# to VB Converter
    Tutorial Sites: W3Schools|ASP.Net|ASP.Net QuickStart|LearnVisualStudio.Net

    So many things to learn, so little time... >_<

    Under Construction...

  29. #29
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: [RESOLVED] Static Master Page

    Quote Originally Posted by Claude2005 View Post
    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

  30. #30
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  31. #31
    Lively Member
    Join Date
    Dec 2009
    Posts
    116

    Re: [RESOLVED] Static Master Page

    Quote Originally Posted by a5m0d1 View Post
    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
  •  



Click Here to Expand Forum to Full Width