Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting browser type in ASP
Message
 
À
03/01/2002 11:10:15
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00600308
Message ID:
00600343
Vues:
15
>I never had to do it before. So far, I was always using it from Javascript. I was wondering what the equivalent would do to detect the browser from ASP?

Michel;

Here is a good starting point. This checks to be sure version 5.0 of I.E. is being used. I use it as an INCLUDE file on my forms.
< %
' Check Browser version...

response.buffer = true


Dim strUserAgent
Dim llOK
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
if inStr(strUserAgent, "MSIE 5.0") <> 0  then
'	Response.Write "Correct Browser is being used"
Else
Response.Redirect " BrowserNotification.asp "
End If	
% >
Tom
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform