Foros del Web » Programando para Internet » ASP Clásico »

Como identifico en ASP el navegador ??NS o IE??

Estas en el tema de Como identifico en ASP el navegador ??NS o IE?? en el foro de ASP Clásico en Foros del Web. Hola, necesito saber en ASP, como identificar en que navegador estoy?. Consulte la ayuda MS, pero no funciona bien el ejemplo. Lo necesito ya que ...
  #1 (permalink)  
Antiguo 23/01/2002, 14:35
 
Fecha de Ingreso: enero-2002
Mensajes: 8
Antigüedad: 22 años, 5 meses
Puntos: 0
Como identifico en ASP el navegador ??NS o IE??

Hola,
necesito saber en ASP, como identificar en que navegador estoy?.
Consulte la ayuda MS, pero no funciona bien el ejemplo.
Lo necesito ya que en Netscape no me interpreta el STYLE para el dimensionamiento de un combo, y si el dato es gigante, el combo es gigante (por si acaso combo=drop down list).
De antemano gracias.
  #2 (permalink)  
Antiguo 23/01/2002, 14:47
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Re: Como identifico en ASP el navegador ??NS o IE??

mm puedes usar la variable de servidor

Request.ServerVariables("HTTP_USER_AGENT&quot ;) pero te regresa algo asi

Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Creative)

salu2 ;) :)

<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
  #3 (permalink)  
Antiguo 23/01/2002, 15:03
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Re: Como identifico en ASP el navegador ??NS o IE??

hi, me puse a trabajar un ratin y aqui esta

Explorador=Instr(1,Request.ServerVariables(&quot;H TTP_USER_AGENT&quot;),&quot;MSIE&quot;)
'Response.Write Explorador

If Explorador&lt;&gt; 0 Then
Response.Write &quot;El explorador es Internet Explorer&quot;
'IE=true
'Netscape=False
Else
Explorador=Instr(1,Request.ServerVariables(&quot;H TTP_USER_AGENT&quot;),&quot;Netscape&quot;)
If Explorador&lt;&gt;0 Then
Response.Write &quot;El explorador es Netscape&quot;
'IE=false
'Netscape=true
End if
End If

salu2
;) :)



<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
  #4 (permalink)  
Antiguo 24/01/2002, 18:54
 
Fecha de Ingreso: enero-2002
Mensajes: 8
Antigüedad: 22 años, 5 meses
Puntos: 0
Re: Como identifico en ASP el navegador ??NS o IE??

Urjose te lo agradezco un monton,
gracias por el regalo de cumpleaños
atte,
Cesar Romero M.
  #5 (permalink)  
Antiguo 26/01/2002, 00:14
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 22 años, 5 meses
Puntos: 1
Re: Como identifico en ASP el navegador ??NS o IE??

hi

pues aqui te va otro regalo que me encontre en asp tutor y me acorde de tu mensaje

&lt;%

ua = Request.ServerVariables(&quot;HTTP_USER_AGENT&quot ;)
If Instr(ua, &quot;MSIE&quot;) Then
If Instr(ua, &quot;MSIE 5.&quot;) Then
Browser = &quot;Microsoft Internet Explorer 5.x&quot;
Elseif Instr(ua, &quot;MSIE 4.&quot;) Then
Browser = &quot;Microsoft Internet Explorer 4.x&quot;
Elseif Instr(ua, &quot;MSIE 3.&quot;) Then
Browser = &quot;Microsoft Internet Explorer 3.x&quot;
If Instr(ua, &quot;MSIE 3.02&quot;) Then
Browser = &quot;Microsoft Internet Explorer 3.02&quot;
End If
Else
Browser = &quot;Microsoft Internet Explorer&quot;
End If
ElseIf Instr(ua, &quot;Mozilla&quot;) and Instr(ua, &quot;compatible&quot;) = 0 Then
If Instr(ua, &quot;Mozilla/4&quot;) Then
Browser = &quot;Netscape Navigator 4.x&quot;
Elseif Instr(ua, &quot;Mozilla/3&quot;) Then
Browser = &quot;Netscape Navigator 3.x&quot;
Else
Browser = &quot;Netscape Navigator&quot;
End If
End If
%&gt;

salu2 :) ;)


<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:51.