Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Override UA meta tagOverride UA meta tag
Previous
 
Next
New Post
11/12/2013 12:03 PM
 

Hi,Is there a way to easily override the <meta http-equiv="X-UA-Compatible" content="IE=Edge"> tag that's set in Default.aspx with  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"> ?

Thanks

Phil

 
New Post
11/12/2013 12:18 PM
 
If you want to change it in ALL sites, you could simply modify the default.aspx.

I would think you could CHANGE the value using some C# code in your skin. I do this in a copy of DNN5 (VBScript) to ADD the X-UA code to a skin with the following:

 Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Dim meta As Literal = New Literal()
        meta.Text = "<meta http-equiv=""X-UA-Compatible"" content=""IE=EmulateIE8"" />"
        Me.Page.Header.Controls.AddAt(1, meta)    
End Sub
 
New Post
11/13/2013 4:07 AM
 

Or you can download and install our free style helper skin object.

 https://stylehelper.codeplex.com/

It will also remove the original meta tag, not only inject a new one.

 Add this to your skin:
<%@ Register TagPrefix="fortyfingers" TagName="STYLEHELPER" Src="~/DesktopModules/40Fingers/SkinObjects/StyleHelper/StyleHelper.ascx" %> 

    <fortyfingers:STYLEHELPER
    id="SH0"
    RemoveFromHead="http-equiv=X-UA-Compatible"
    AddToHead="<meta http-equiv='X-UA-Compatible' content='IE=EmulateIE9' />"
    AddAtEnd="False"
    runat="server" />

 
New Post
11/13/2013 2:53 PM
 
Thanks for the replies Mike and Timo - will probably use the style helper as I can do some other stuff with that too.
 
New Post
8/11/2014 2:34 PM
 
The website of my company needed to be inserted in compatibility mode because there was a part of the certification system that worked good only in compatibility mode.

For do the new website in DNN was no longer necessary to use the compatibility mode because it was destroying the site layout. But many customers were instructed by support sector to put the company's website in compatibility mode, so I needed a code that forced the site to not stay in compatibildade module. I used the code Timo and everything worked.

thanks Timo!
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Override UA meta tagOverride UA meta tag


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out