Including headers and footers from another files in ASP.NET
asp.net, c#, include, php
Solution
Webforms - you'll want to use user controls.
ASP.NET MVC - you'll want to use partial views.
A quick note based on one of the other answers - if you're using webforms and using this strictly to use a common header and footer for many pages on your site, then master pages actually would be the best approach in my opinion. But if you are asking, in general, how to render re-usable blocks of code in an ASP.NET web application, similar to how you use `includes` in php, then user controls / partial views is what you're looking for.
Problem
I'm new with ASP.NET, and I want to use a simple technique that I used to do with PHP on a web site. That is, include files to render headers and footes. For example, ``` <?php include "header.php"; echo "Hello, world!"; include "footer.php"; ?> ``` What's the right way to do something like that?