.net - Is a code only ASP.NET Header and Footer possible? -


I have a global header and footer in which there is a database connection and the headers and footers are different and this ASP. Net - This should be done before any HTML output and output to the footer after any HTML.
I can not find any easy way to do this, like classic ASP - if possible please post an example or thank you, thank you.


A little more detail is that I have a SQL connection string, then I want to use a single SQL object in all pages on the website. - Connection in connection string and headers, and disconnected in the footer.

Your use posts headers and footers Many people believe that you really want to make HTML Which make a visible header and footer in the output. Therefore the number of references to master pages in the answer.

Although I'm guessing in a different direction. You have a classic ASP page that contains the inline code from the file contained, then the main ASP page uses the contents included in the body, then the final file included below, which prepares the things created in the first included is.

In ASP.NET, you can not treat page content, as it was a pure sequential script for you in ASP. If you can actually confirm the contents in the Page_Load event, then clear it in Page_Unload .

Are you sure you want to close the app without any re-engineering? I am trying to copy the basic ASP app infrastructure in ASP.NET. The goal is to give the client using ASP.NET for the purpose of using the same UI and function (or better) for ASP.NET. This gives you a platform to move forward rather than create a weird looking ASP.NET app that introduces a legacy code to life already.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -