
September 15th, 2008, 02:41 AM
|
 |
Moderator
|
|
Join Date: Dec 2006
Location: West London, UK
|
|
Hi
You have to use the Request.ServerVairables("HTTP_USER_AGENT") which will return the following for IE 7...
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)
You can then use...
Code:
strBrowser = Request.ServerVairables("HTTP_USER_AGENT")
If InSrt(strBrowser, "MSIE7") > 0 Then
strUserBrowser = "IE 7"
Elseif InStr(strBrowser, "Mozilla/5.0") > 0 Then
strUserBrowser = "FireFox"
End if
You need to add an elseif for each browser user agent string.
__________________
Hope this advice helps.
If so please show your appreciation by adding reputation points (click gauge image  on top right of this post).
- Post your code - Post your errors - Be clear - Be courteous -
AND PLEASE...Finalise your thread with a solution or confirmation that the last advice worked or failed.
Visit My ASP Free Members Club Profile
|