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

Como Hago Este Redireccion

Estas en el tema de Como Hago Este Redireccion en el foro de ASP Clásico en Foros del Web. HOLA AMIGOS DE NUEVO BENGO A PEDIRLES SU AYUDA . RESULTA KE HE INTENTADO HACE KE AL ENVIAR LOS DATOS DE UN FORMULARIO A UNA ...
  #1 (permalink)  
Antiguo 18/07/2005, 16:12
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
Como Hago Este Redireccion

HOLA AMIGOS

DE NUEVO BENGO A PEDIRLES SU AYUDA . RESULTA KE HE INTENTADO HACE KE AL ENVIAR LOS DATOS DE UN FORMULARIO A UNA BASE DE DATOS , KIERO KE ME REDIRECCIONE POR EJEMPLO AL INDEX.HTML COOMO HAGO SI MI CODIGO ES ASI: GRACIAS.

<%
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("librovisitas.mdb")&"")

set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open "formulario", Conn, 2, 3

RS.AddNew
rs("nombre")=request.form("nombres")
rs("apellidos")=request.form("apellidos")
rs("empresa")=request.form("empresa")
rs("telefono")=request.form("telefono")
rs("mail")=request.form("mail")
comentario=replace(request.form("comentario"),chr( 10),"<br>")
rs("comentario")=comentario

RS.Update()
RS.Close()
conn.Close()
set conn = nothing
set conexion = nothing
%>
  #2 (permalink)  
Antiguo 18/07/2005, 16:15
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
Código:
.
.
.
conn.Close()
set conn = nothing
set conexion = nothing
Response.Redirect("index.html") 
Salu2
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #3 (permalink)  
Antiguo 18/07/2005, 16:29
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
Gracias Por La Ayuda Pero Eso Es Lo Ke Yo Hago Y No Me Redirecciona
Ke Sera Lo Ke Pasa???
  #4 (permalink)  
Antiguo 18/07/2005, 16:34
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
Como que no te redirecciona, te envia algun error?
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #5 (permalink)  
Antiguo 18/07/2005, 16:40
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
No Simplemente Me Deja En La Misma Pagina
??????????
  #6 (permalink)  
Antiguo 18/07/2005, 16:40
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
Pon tu codigo, incluyendo el redirect
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #7 (permalink)  
Antiguo 18/07/2005, 16:44
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
OKE ASI LO TENGO

<%
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("librovisitas.mdb")&"")

set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open "formulario", Conn, 2, 3

RS.AddNew
rs("nombre")=request.form("nombres")
rs("apellidos")=request.form("apellidos")
rs("empresa")=request.form("empresa")
rs("telefono")=request.form("telefono")
rs("mail")=request.form("mail")
comentario=replace(request.form("comentario"),chr( 10),"<br>")
rs("comentario")=comentario

RS.Update()
RS.Close()
conn.Close()
set conn = nothing
set conexion = nothing
Response.Redirect("index.html")
%>
  #8 (permalink)  
Antiguo 18/07/2005, 16:48
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
Ninguna condicion?? es decir que este es todo el codigo?
Ahora, estas seguro que el formulario si se envia a esta pagina?
Y que se hace el update de este registro?
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #9 (permalink)  
Antiguo 18/07/2005, 16:53
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
MIRA MEN LAPAGINA DEL FORMULARIO SE LLAMA formu.asp Y A LA KE ENVIA SE LLAMA enviado.asp

DE LO KE SI ESTOY SEGURO ES DE KE ME ENVIA A LA PAGINA ENVIADO.ASP Y LUEGO BOY A REVISAR LA BASE DE DATOS Y SI ME ENVIA LOS DATOS LA UNICA INSTRUCCION KE NO HACE ES LA DE REDIRECCIONAR. ???

Y LA VERDAD ES KE SOY NUEVO EN ESTE TEMA DE ASP
  #10 (permalink)  
Antiguo 18/07/2005, 16:55
 
Fecha de Ingreso: abril-2004
Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 21 años
Puntos: 4
Es probable que se este generando algún error,me ha pasado y no muestra el mensaje.


1.- Verifica que en verdad se ejecute tu instruccion correctamente, es decir que se inserte el registro.

2.- No hay de otra, o es la primera opción o tu máquina está loca (imposible) !!!
  #11 (permalink)  
Antiguo 18/07/2005, 16:59
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
Jajajaja Si Todos Los Registros Me Los Envia Perfectamente A La Base De Datos.
  #12 (permalink)  
Antiguo 18/07/2005, 17:04
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
JAJAJAJA SI TODOS LOS REGISTROS ME LOS ENVIA PERFECTAMENTE A LA BASE DE DATOS.

PERO ACABO DE VER ESTE ERROR

Response object error 'ASP 0156 : 80004005'

Header Error

/Marketing2/enviado.asp, line 337

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content
Y LA LINEA 337 ES ESTA >>>>>>Response.Redirect("index.html")


__________________________________________________ ______
RS.Update()
RS.Close
conn.Close
set conn = nothing
set conexion = nothing
Response.Redirect("index.html")
%>
  #13 (permalink)  
Antiguo 18/07/2005, 17:07
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98

Pon esta linea al principio(linea 1) de tu codigo

Response.Buffer = true

P.D. no que no mandaba mensaje de error?
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #14 (permalink)  
Antiguo 18/07/2005, 17:19
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
Ahora Si Me Redirecciono Jejej Gracias

ý Como Hago Para Ke Me Redireccione Despues De 3 Segundos???
  #15 (permalink)  
Antiguo 18/07/2005, 17:38
Avatar de trasgukabi  
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 20 años, 8 meses
Puntos: 18
eso es
<META HTTP-EQUIV=Refresh CONTENT="3; URL=lapaginaquesea.asp">
  #16 (permalink)  
Antiguo 18/07/2005, 18:00
Avatar de mrjhon  
Fecha de Ingreso: junio-2005
Mensajes: 155
Antigüedad: 19 años, 10 meses
Puntos: 0
Hey Viejo Gracias Por La Ayuda Si Me Sirvio

En Estos Dias Los Buelvo A Molestar
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 11:05.