Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I modify the <head/> section of a Page in .NET from a User Control without runat="server"?

I have a page that does not have runat="server" set in the <head/> section. I do not have access to modify any of the code in the page.

This page contains a user control which I do have access to. Can I add a <meta/> tag to the head section of the page from the user control? It needs to be server-side so a javascript solution won't work.

like image 413
fehays Avatar asked Oct 09 '22 20:10

fehays


1 Answers

One option is to create a Response Filter, and then modify the output before it's sent to the user.

https://web.archive.org/web/20211029043851/https://www.4guysfromrolla.com/articles/120308-1.aspx

like image 184
Erik Funkenbusch Avatar answered Oct 13 '22 10:10

Erik Funkenbusch