...

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



space cowboy
04-26-2007, 12:03 AM
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).

OK,

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?

glenngv
05-02-2007, 08: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"
Else
Response.Write "You are not using Internet Explorer"
End If



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum