close

Creating Page Templates The Right Way


 

There are so many things we do while coding that we should have avoided and the end result maybe quite different from what we have expected. While working in ASP.NET we have to take care of some common pitfalls that tend to be on the way to our success in the coding of robust and superb applications. Page templating schemes are built in ASP.NET as they form an integral part of any application being built on this platform. This is mainly done to share the common user interface components like headers, sidebars and footers. Thus one can easily recall these templates on the pages that are subsequently built and customize them according to the needs of that particular page. However in ASP.NET this can be quite tricky as there is no structured way to accomplish page templating. It may even become more complex if pages are large and require nesting. Many smart developers employ ad hoc page templating schemes although the feedback that has come out has mixed results. The classic ASP method is the most commonly used method for page templating although it is one of the most archaic method yet it is widely used. It is commonly done by inserting a include file.

The include file is not really capable of taking advantage of the ASP.NET framework. Although this will work for a limited period but will not really be of use in the long run. There is yet another ad hoc method which is widely used while creating page templates. It's the Begin-And-End User Control Method. This method is widely used for the header and footer content. It's a major cause of the errors that are generated and cause a lot of confusion in the minds of people who are responsible for the page layout. Custom Control Method causes a bad impression as it causes a bad environment in a team, with separate designer and programmer roles, because changes to the template require programmers to spend time re-coding the designer's work. Thus its not really wise to use in your .NET project. If you create a base page class which ultimately inherits from the ASP.NET Page class will be a really good option; however, inheritance is intended to simplify sharing common code among all the inherited pages. For more details on Code Protection technology, .net Obfuscator, .net Code Security and .net Code Security feel free to visit us at http://www.secureteam.net

Author writes regularly about Code Protection and .net Obfuscators. To know more about .net Code Security, .net Code Protection and .net obfuscation feel free to contact the author at http://www.secureteam.net

 

 

arrow
arrow

    zcvbn 發表在 痞客邦 留言(0) 人氣()