
30/04/2009, 05:41
|
 | | | Fecha de Ingreso: marzo-2009 Ubicación: Madrid
Mensajes: 92
Antigüedad: 16 años, 1 mes Puntos: 0 | |
Respuesta: ID Página Este es el codigo que quiero que se muestre si el id seleccionado es el mismo que esta en el navegador tipo paginaweb . asp?=8 osea que el 8 es el id y quiero que sea el que se muestre de la base de datos, una ayuda por favor que llevo toda la mañana y seguro que es una tonteria
<%
basedatos = Server.MapPath("/Data/bdchame.mdb")
Set BD=Server.CreateObject("ADODB.Connection")
BD.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & basedatos
Set rs1=CreateObject("ADODB.Recordset")
rs1.open "select * from GC_Espectaculos",BD
rs1.Movefirst
idpagina = Request.QueryString("IdEspectaculo")
If idpagina <> rs1.Fields("IdEspectaculo") Then
%>
<table border='0' cellpadding='0'>
<tr>
<td width="175"><strong>Link</strong></td>
<td width="175"><input name="Vinculo" type="text" id="Link" VALUE="<%=rs1.Fields("vinculo")%>"></td>
<td width="250"><span class="Estilo2"></span></td>
</tr>
<tr>
<%
Sql = "SELECT * FROM "&PREFIJO_TABLAS&"Espectaculos "
Sql = Sql & "WHERE Vigente " 'AND FechaFin >= #"&FechaInicioHoy&"# "
Sql = Sql & "ORDER BY FechaInicio"
Set Rec = Conn.Execute (Sql)
%>
<td><strong>Contacto</strong></td>
<td><input name="Contacto" type="text" id="Link3" VALUE="<%=Rec("Contacto")%>"></td>
<td><span class="Estilo2">* Email del contacto </span></td>
</tr>
<tr>
<td><strong>Fecha Inicio </strong></td>
<td>
<select name="DiaI"><%=ComboFecha(DiaI, "d", 1, 31)%></select> /
<select name="MesI"><%=ComboFecha(MesI, "m", 1, 12)%></select> /
<select name="AnioI"><%=ComboFecha(AnioI, "a", 2005, Year(Date)+3)%></select>
</td>
<td><span class="Estilo2">* Cuando inicia el curso dd/mm/aaaa </span></td>
</tr>
<tr>
<td><strong>Fecha Fin</strong></td>
<td>
<select name="DiaF"><%=ComboFecha(DiaF, "d", 1, 31)%></select> /
<select name="MesF"><%=ComboFecha(MesF, "m", 1, 12)%></select> /
<select name="AnioF"><%=ComboFecha(AnioF, "a", 2005, Year(Date)+3)%></select>
</td>
<td><span class="Estilo2">* Cuando finaliza dd/mm/aaaa </span></td>
</tr>
<%
For i = 1 To IDIOMA_CANTIDAD
If (Eval("IDIOMA_"&i&"_ACTIVO")) Then
%>
<!--<tr><td colspan="3" class="Titulo-Idioma"> <%=Eval("IDIOMA_"&i&"_NOMBRE") %></td></tr>-->
<tr>
<td><strong>Ciudad</strong></td>
<td><input type="text" name="Ciudad_<%=Eval("IDIOMA_"&i&"_PREFIJO")%>" id="Lugar" VALUE="<%=rs1.Fields("Ciudad_es")%>"></td>
<td><span class="Estilo2">* La ciudad donde dara el Espectaculo</span></td>
</tr>
<tr>
<td><strong>Teatro</strong></td>
<td><input name="Lugar_<%=Eval("IDIOMA_"&i&"_PREFIJO")%>" type="text" id="Escuela" VALUE="<%=rs1.Fields("Lugar_es")%>"></td>
<td><span class="Estilo2">* Nombre del Teatro</span></td>
</tr>
<tr>
<td><strong>Nombre del Espectáculo</strong></td>
<td><input name="Espectaculo_<%=Eval("IDIOMA_"&i&"_PREFIJO")% >" type="text" id="Espectaculo" VALUE="<%=rs1.Fields("Espectaculo_es")%>"></td>
<td> </td>
</tr>
<%
End If
Next
%>
<tr>
<td><input type="submit" name="Submit" value="Agregar espectáculo" /></td>
<td> </td>
<td> </td>
</tr>
</table>
<%
Else
response.write(idpagina)
rs1.Movenext
End If
BD.Close
%> |