internet explorer - ASP.NET force user to IE as default -


I have a web app in asp.net/vb The scripts on the site only work properly with IE. Is there a way to force the user to use IE all the time on the site?

You do not want to. Are you really ready to ignore 75% traffic? Or have you paid by Microsoft and actually got a cool website idea? Either way, you can use Javascript and find the browser and if it does not have IE, then nothing will show (you do main "display: none" ). Here's an example to explore the browser, however these methods are used to customize the style for browsers, not to whom you want it

  function detectIE ( ) {Var isIE = navigator.userAgent.toString (). IndexOf ("IE") = -1 if (isIE) is {document.getElementById ("main"). Style.display = "block"; } Other alerts ("This website can only be accessed using Internet Explorer"); } & Lt; Body onload = "detectIE" & gt; & Lt; Div id = "main" style = "display: none;" & Gt; // Everything inside this div & lt; / Div & gt; & Lt; / Body & gt;   

Another method is conditional use

    

Remember, this is not a 100% solution, browsers can change user agent strings and present themselves as IE or can close JavaScript. Instead of ignoring them completely, you should consider adding support for other browsers.

Comments