Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/03/2003, 05:18
Avatar de mrgubu
mrgubu
 
Fecha de Ingreso: febrero-2002
Ubicación: Granada
Mensajes: 431
Antigüedad: 23 años, 2 meses
Puntos: 2
Calendario y Fechas en ASP

Estoy intentando adaptar el calendario en ASP de ASP Tutor (http://asptutor.com/asp/vart.asp?id=104) .

Quiero que los días del més sólo tengan hiperlink si coinciden con las fechas almacenadas en una base de datos. (El código de Asp Tutor muestra los días con hiperlink siempre)

Para ello abro un recordset con todos los registros de la tabla, y trato de hacer (sin conseguirlo, claro) un bucle para que muestre los días con hiperlinks sólo si coinciden con las fechas de la base de datos.

¿Podéis ayudarme?

La parte del código de ASP Tutor donde muestra los días es este:

Código:
For Row = 0 to 5
	For Col = 0 to 6
		If Row = 0 and Col < FirstDay then
			response.write "<td>&nbsp;</td>"
		elseif CurrentDay > LastDay(MyMonth, MyYear) then
			response.write "<td>&nbsp;</td>"
		else
			response.write "<td"
			if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month(Date) and CurrentDay = Day(Date) then 
				response.write " class='calCeldaResaltado' align='center'>"
			else 
				response.write " align='center'>"
			end if
			response.write "<a href='" & URLDestino & "?day=" & CurrentDay _
						& "&month=" & MyMonth & "&year=" & MyYear & "'>" 
			if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month(Date) and CurrentDay = Day(Date) then 
				Response.Write "<div class='calResaltado'>" 
			else
				Response.Write "<div class='calSimbolo'>" 
			end if
			Response.Write CurrentDay & "</div></a></td>" 			
                CurrentDay = CurrentDay + 1
		End If
	Next
	response.write "</tr>"
Next
Gracias.