View Full Version : if IE direct script to page 1 etc

space cowboy
04-25-2007, 11:03 PM
Hi there, need a bit of help. I have done a search but the results are giving me too much code for my needs. All I want is something very basic- (which seems harder to find than something not so).


I want some script that will go onto an ASP page. Basically I want that if the browser is IE it will present them with a bit of text and a link (to say page 1). But if it is not IE it will present them with a different piece of text and a link to page 2.

It doesnt matter what version of IE it is (regardless wether its version 3 or vesion 7), I just need to determind if its IE or not.

Does anyone have a very simple piece of code?

05-02-2007, 07:30 PM
This is the basic test for sniffing IE.

If InStr(1, Request.ServerVariables("HTTP_USER_AGENT"), "MSIE") then
Response.Write "You are using Internet Explorer"
Response.Write "You are not using Internet Explorer"
End If