Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
Here is the C# code,
public MainForm()
{
WriteRegistry();
}
private void WriteRegistry()
{
const string IERegPath = @"Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION";
const string IEVersion = "11001";
const string AppName = "MyTestApp.exe";
RegistryKey Regkey = null;
try
{
Regkey = Registry.CurrentUser.OpenSubKey(IERegPath, true);
Regkey.SetValue(AppName,IEVersion, RegistryValueKind.DWord);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Here we set IE Version value as 11001 which means ; Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.
You can find IE Version values here;
https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx
You can find IE Version values here;
https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx
The reason that we added this register under CURRENT_USER instead of LOCAL_MACHINE is that writing a registery to LOCAL_MACHINE requires admin rights and the user who is using your application may not be administrator on the computer. That's why it is safer to add registry for only current user.
After running your application, you can see the registry value as ;
After running your application, you can see the registry value as ;
Regards,