I have a website that I want to restrict only to Internet Explorer, how do I do that? Code is ASP.net
I have a website that I want to restrict only to Internet Explorer, how do I do that? Code is ASP.net
Hi there,
Have you tried these?
Code:Dim browserName As String = Request.Browser.Browser Dim browserVersion As String = Request.Browser.Version
Hi there,
Also, why do you want to restrict your application to Internet Explorer only?
Because the master page doesn't line up right in other browsers and everyone has Internet Explorer, and it loads fine in IE
I don't have that kind of problem with master pages, maybe you're not coding or doing it in a correct way, since Internet Explorer is the only browser that displays it correctly. I suggest you visit www.w3schools.com so you can look up on how to code your web pages correctly so that all major browsers can display your pages correctly.Because the master page doesn't line up right in other browsers and everyone has Internet Explorer, and it loads fine in IE
What do you mean?No I haven't simply because that doesn't look like it's going to reject any other browser, will it?
Last edited by Claude2005; Jun 9th, 2010 at 12:52 AM. Reason: typo
After reading it again, here's the code again on my first postNo I haven't simply because that doesn't look like it's going to reject any other browser, will it?
To answer your question, it's a no. I just gave you this in order for you to have a head start. You could just tell me if you don't know what to do with that code. So here's some addition to the code above...Code:Dim browserName As String = Request.Browser.Browser Dim browserVersion As String = Request.Browser.Version
Code:If browserName = "IE" Then 'Do what you want here Else 'Do what you want here End If
I hate to be a pain, but how do I display a Message or even just a webpage (I am used to VB.net where I would say Page1.show, but that doesn't work in ASP.net) to the user if they're not using Internet Explorer?
Hi there,
Hmm, do you know HTML? It's a good start to learn HTML first before going to ASP.NET. You could do HTML on the aspx pages to display static information.
Hey,
Ok, you are going about this in completely the wrong way (in my opinion).
So your master page doesn't line up correctly in other browsers, how about you fix that problem, rather than preventing users from seeing your site if they are not using IE. You would be cutting traffic to your site greatly if you do this.
Although I have IE installed, for testing purposes, I use Chrome as my default browser, and I wouldn't want to have to open IE just to see a site that only works in IE, and I am sure I am not alone in this.
Gary
Remember to mark your thread as resolved. Remember to rate posts that help. Hitchhiker's Guide to Getting Help at VB Forums.
ASP.NET Tutorials (updated Feb 1st 2009) ASP.NET FAQs (updated July 17th 2011)
Free Stuff: WebsiteSpark|DreamSpark|BizSpark|eBooks
Learning Resources: MSDN|LearnVisualStudio|TrainingSpot|ScottGu's Blog|ASP.Net Starter Kits|Regex|RegExLib
Useful Tools: XPath Builder|UltraMon|RegExBuddy|CopySourceAsHtml|TracExplorer|SQLyog|Chart Controls for .Net|SharePoint Designer|CodeRush Express
Coding Links: XPath|ConnectionStrings|VB and MySQL|MySQL Connector.Net|My.Settings
ADO.Net: MSDN Reference|Introduction|Using Access|Always use Parameters|Save and Retrieve Data - jm|An Explanation - jm
Code Bank Submissions: Code Snippets|Profile Provider|Serialization: C# VB|Restricted Menu|Compressed HttpWebRequest|Enumerate and Add Internet Explorer Favourites: VB C#|C# Tabbed Web Browser|Enhanced Tabbed Web Browser: VB C#
My Blog - View my MCP Certifications