Mar
31
Written by:
Dylan Barber
3/31/2009 2:52 PM
In one of my previous articles (SSRS – The Report Viewer ‘spinny’) I described how a simple meta tag had halted and frustrated our attempts to get the report viewer control to work and act as we expected. One comment to that article was how to remove the offending meta tag.
It turns out this is very easy in ASP.NET and in DNN it can be done with any module with the simple inclusion of a small bit, one line, of code. You could also add meta tags if you needed for some purpose.
1: Page.Header.Attributes.Remove("http-equiv")
Adding this line in a module should remove the offending meta tag. I have only tested this on a few pages but it works in those instances. Luckily DNN only has a few http-equiv attribute meta tags so you could progmatically add back in the ones you need. If there were more (http://msdn.microsoft.com/en-us/library/ms533876(VS.85).aspx) you may want to loop through the controls in the head and only remove the ones you want to take out.