Skip to main content

Posts

Showing posts with the label IE

Change the IE Compatibility Mode manually

We can set HTML rendering mode using Meta Tag. < meta http-equiv ="X-UA-Compatible" content ="IE=5" /> This is set compatible mode to IE-5, like wise there are few modes we can set using a meta tag. content="IE=5" - force to render in “Quirks” mode. content="IE=7" - forces to render in IE 7 Strict mode. content="IE=EmulateIE7" - use !DOCTYPE declaration to detect rendering mode content="IE=8" -   forces to render Internet Explorer Standards mode. content="IE=EmulateIE8" - use !DOCTYPE declaration to detect rendering mode content="edge" - use most recent mode Reference   http://hsivonen.iki.fi/doctype/ We can use  Web Config to alter the page rendering mode < httpProtocol > < customHeaders > < remove name ="X-UA-Compatible" /> < add name ="X-UA-Compatible" value ="IE=edge" /> </ customHeaders > </ httpProtocol >

How To Access Server.MapPath in a Class that is not inside Web Project

In My case I have decoupled WCF Class Libraries and WCF Host in to two separate projects.  Then i need to get the Server.MapPath in a class library. So I have add the Reference to System.web   Since I'm using 4.5 dll is available on C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll HttpContext.Current.Server.MapPath( "~/App_Data/MediaPackager_MP4ToSmooth.xml" )

ie window.open not working

When I tried to open a new window using JavaScript it worked for Google Chrome and IE. but didn’t work in IE. window.open( 'url ' , 'B HELP' , 'width=650' ); I found that space character in title bar cause the error. Therefore I used the following code and it worked fine. window.open( 'url ' , 'B-HELP' , 'width=650' );