Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/09/2009, 14:34
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 18 años, 4 meses
Puntos: 126
Respuesta: Almacenar valores textbox REQUEST.FORM con ciclo ASP

Hola

Te he montado este ejemplo. El nombre de los campos de form ha de ser el mismo

Código asp:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title>
  3. <meta name="http-equiv" content="Content-type: text/html; charset=UTF-8"/>
  4. </head>
  5. <body>
  6. <form action="x.asp" method="post">
  7. <input type="text" name="campos" value="valor1" />
  8. <input type="text" name="campos" value="valor2" />
  9. <input type="text" name="campos" value="valor3" />
  10. <br />
  11. <input type="submit" value="Enviar" />
  12. </form>
  13. <br /><br />
  14. Esta es la informaci&oacute;n recibida
  15. <br /><br />
  16. <&#37;
  17. If Request.Form("campos") <> "" Then
  18. Response.Write("+ VALORES = " & Request.Form("campos") & "<br />")
  19. Response.Write("+ SE HAN RECIBIDO: " & Request.Form("campos").count & " valores<br />")
  20. for i = 1 to CInt(Request.Form("campos").count)
  21. Response.Write("+ VALOR CAMPO" & i & " = " & Request.Form("campos")(i) & "<br />")
  22. Next 'i
  23. End if
  24. %>
  25. </body>
  26. </html>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />