Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/01/2007, 10:57
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 1 mes
Puntos: 535
Re: registro aleatorio en include

Código:
<%
'generás un número aleatorio entre 1 y 3 y se lo asignás a una variable
if nro_aleatorio = 1 then
%>
<!-- #include file='home_right_1.asp' -->
<%
end if
if nro_aleatorio = 2 then
%>
<!-- #include file='home_right_2.asp' -->
<%
end if
if nro_aleatorio = 3 then
%>
<!-- #include file='home_right_3.asp' -->
<% end if %>
esto, porque los includes de asp incluyen antes de que el código asp sea interpretado. otra opción es usando server.execute():

Código:
<%
'generás un número aleatorio entre 1 y 3 y se lo asignás a una variable
server.execute("home_right_" & nro_aleatorio & ".asp")
%>
Suerte
__________________
...___...