Showing posts with label Internet Explorer 11. Show all posts
Showing posts with label Internet Explorer 11. Show all posts

Tuesday, April 11, 2017

Force a site to NOT render in compatibility view

In IE, compatibility view is great.  It forces the newer versions of IE to render a site like it did back when IE 7 was around.  However, sometimes you have an older site that needs compatibility running on the same domain as a newer site that doesn't need compatibility.  You can force the newer site to NOT run in compatibility view by inserting this in the head tag of your page:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
UPDATE: Make sure this line is the first line under the head tag.

Tuesday, December 31, 2013

Disabling ASP LinkButton controls in newer versions of Internet Explorer

Since IE 10, I have noticed that when a LinkButton control is disabled (Enabled="False"), the rendered link is not grayed out like it used to be and seemingly should be.  The link is disabled for all intents and purposes, but just appears to be enabled.  This can cause confusion to users if you rely on this mechanism.  The quick fix has always been "compatibility view" in IE, but this is being phased out over time by Microsoft as we get newer version of Internet Explorer.

Interestingly enough, the html rendered is the same.  You still get an anchor tag with the disabled attribute set to "disabled".  It is the browser that is reacting differently to this tag.  IE no longer styles by default an anchor tag with this particular attribute the way you expect (i.e. "grayed out").  You are forced to provide the css to render in this scenario.  The following css should style your LinkButton like the good ole days.
    a[disabled="disabled"] {
        color: gray;
        text-decoration: none;
    }
    a[disabled="disabled"]:hover {
        color: gray;
        text-decoration: none;
    }
Now, maybe you can finally turn off compatibility view!

Tuesday, December 17, 2013

Show or Hide the login window when accessing a site that uses Windows Authentication.

You're working on a site that is set up for Windows Authentication.  Two scenarios:

  1. You want your credentials to "pass through" without logging in.  In IE, open Internet Options, Security tab.  Select the zone the site is in, or add it to a zone if appropriate.  Click the Custom Level button.  Scroll down and select the "Automatic logon with current username and password" under the User Authentication, Logon section.
  2. You don't want to be logged in automatically so you can log in as other people for testing or whatever.  Follow the steps above except choose the "Prompt for username and password" radio button.