ASP.Net Page template technique
-
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.
jingoooli pesar salam , bejaye in kara ye kam be site man beres ke vazesh kheyli kharabe. :) :sigh:
-
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.
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.
-
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.
-
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.
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.
-
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.
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
-
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
-
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