adding a footer to the page in an HttpModule
I could use late events such as EndRequest开发者_StackOverflow中文版 and put inside Response.Write but this way whatever I'm adding would come after the /html tag and the HTML won't be well formed.
Very bad practice to use the HttpModule for page footer. This can lead to possible errors with UpdatePanels, and possible with other controls on randomly pages - especial if you try to add controls.
Also its probably delay the load of all pages and eat a lot of memory reading the page and append at the end strings on every single request.
Use a master page !. Its very simple and the correct way.
More to read: Creating a Layout Using Master Pages
精彩评论