Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.Net Page template technique

ASP.Net Page template technique

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminoopperformance
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    w3Nima
    wrote on last edited by
    #1

    There are two way for developing a skinnable site. First using inheritance second using server control But I am not sure which way has better performance.

    S M R 3 Replies Last reply
    0
    • W w3Nima

      There are two way for developing a skinnable site. First using inheritance second using server control But I am not sure which way has better performance.

      S Offline
      S Offline
      shamseparsa
      wrote on last edited by
      #2

      jingoooli pesar salam , bejaye in kara ye kam be site man beres ke vazesh kheyli kharabe. :) :sigh:

      1 Reply Last reply
      0
      • W w3Nima

        There are two way for developing a skinnable site. First using inheritance second using server control But I am not sure which way has better performance.

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        It depends on what do you want to do. So what do you wamt to do in your server control or inheritace page? If you want to customize some general functional of your pages,like logging error,secutiy checking or some other things inheritance is better ,but if you want a customize control inside some of your pages of course second solution. Mazy No sig. available now.

        W 1 Reply Last reply
        0
        • M Mazdak

          It depends on what do you want to do. So what do you wamt to do in your server control or inheritace page? If you want to customize some general functional of your pages,like logging error,secutiy checking or some other things inheritance is better ,but if you want a customize control inside some of your pages of course second solution. Mazy No sig. available now.

          W Offline
          W Offline
          w3Nima
          wrote on last edited by
          #4

          I want to customize general layout of pages, like header, footer, style and place holder for content of page. So content of every page move to placeholder of template. I need a flexible and compatible solution.

          M 1 Reply Last reply
          0
          • W w3Nima

            I want to customize general layout of pages, like header, footer, style and place holder for content of page. So content of every page move to placeholder of template. I need a flexible and compatible solution.

            M Offline
            M Offline
            Mazdak
            wrote on last edited by
            #5

            Well in this situaation I do it like this: For header and footer I create user controlss,for example header contain some image and links for SIGHN IN,MY PROFILE,.... .I add these controls to all pages, I don't do these kind of UI things in inheritane ,and do them in User or Server controls ,as I told you mostly some things like error handleing there. I'm not sure about that place holder you say but I guess it is not good for inheritance too. Mazy No sig. available now.

            1 Reply Last reply
            0
            • W w3Nima

              There are two way for developing a skinnable site. First using inheritance second using server control But I am not sure which way has better performance.

              R Offline
              R Offline
              Rocky Moore
              wrote on last edited by
              #6

              Actually, what I currently do is build a header, footer and any other section into user controls. I make a basic layout and drop the controls on it. Then for the content area, I swap in a user control that has the content for that page depending on a parameter being passed. As an example, on my GotTheAnswerToSpam.com[^] site, the four pages are one page with four different web user controls for content. The content you see in the right side panel is from the web user controls. There are four of them and I use a parameter "P=" on the URL to determine which user control to show. Since the page is all modular, I can change it into in order and the content (currently in the right panel) stays the same but can be in different locations if desired. It is time for bed, so I hope I did not make that too confusing :) Also, cascading style sheets are great when you are talking skinning. Rocky <>< www.HintsAndTips.com

              W H 2 Replies Last reply
              0
              • R Rocky Moore

                Actually, what I currently do is build a header, footer and any other section into user controls. I make a basic layout and drop the controls on it. Then for the content area, I swap in a user control that has the content for that page depending on a parameter being passed. As an example, on my GotTheAnswerToSpam.com[^] site, the four pages are one page with four different web user controls for content. The content you see in the right side panel is from the web user controls. There are four of them and I use a parameter "P=" on the URL to determine which user control to show. Since the page is all modular, I can change it into in order and the content (currently in the right panel) stays the same but can be in different locations if desired. It is time for bed, so I hope I did not make that too confusing :) Also, cascading style sheets are great when you are talking skinning. Rocky <>< www.HintsAndTips.com

                W Offline
                W Offline
                w3Nima
                wrote on last edited by
                #7

                That’s right, but how swaps content of page to user control template ?

                1 Reply Last reply
                0
                • R Rocky Moore

                  Actually, what I currently do is build a header, footer and any other section into user controls. I make a basic layout and drop the controls on it. Then for the content area, I swap in a user control that has the content for that page depending on a parameter being passed. As an example, on my GotTheAnswerToSpam.com[^] site, the four pages are one page with four different web user controls for content. The content you see in the right side panel is from the web user controls. There are four of them and I use a parameter "P=" on the URL to determine which user control to show. Since the page is all modular, I can change it into in order and the content (currently in the right panel) stays the same but can be in different locations if desired. It is time for bed, so I hope I did not make that too confusing :) Also, cascading style sheets are great when you are talking skinning. Rocky <>< www.HintsAndTips.com

                  H Offline
                  H Offline
                  hxxbin
                  wrote on last edited by
                  #8

                  Hi I got a question, how you add the specific content to your template via the parameter P??? Before into ASP, I did that but with a switch and then a include directive, but now I don't know how. Could you tell me how?? ---- hxxbin

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups