Foros del Web » Programación para mayores de 30 ;) » .NET »

Enviar Simple Formulario

Estas en el tema de Enviar Simple Formulario en el foro de .NET en Foros del Web. Hola a todos les comento que empece a trabajar en asp.net y soy absolutamente nuevo jeje, resulta que necesito enviar un formulario html bien simple ...
  #1 (permalink)  
Antiguo 29/06/2012, 07:34
Avatar de djaevi  
Fecha de Ingreso: marzo-2007
Ubicación: Moreno, Buenos Aires
Mensajes: 400
Antigüedad: 17 años, 1 mes
Puntos: 47
Enviar Simple Formulario

Hola a todos les comento que empece a trabajar en asp.net y soy absolutamente nuevo jeje, resulta que necesito enviar un formulario html bien simple y recojer los datos en otra pagina, he visto miles de ejemplos y de hecho ya tengo mis 2 paginas listas el problema es que al enviar el formulario me sale un error....

Server Error in '/' Application
Compilation Error


Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.

Compiler Error Message: VBNC_CRASH:
/2.0/formweb/simple.aspx

Version information: Mono Runtime Version: 2.10.8 (tarball); ASP.NET Version: 2.0.50727.1433

Estoy usando el programa Mono para emular el servidor virtual les dejo el codigo de mis 2 paginas, tampoco sabria bien como crear la pagina donde recibo los datos, en dreamweaver me da las opciones:

ASP Javascript
ASP VBScript
ASP.NET #C
ASP.NET VB.

Les dejo mis codigos:

index.html

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Untitled Document</title>
  5. </head>
  6.  
  7.     <form method="POST" action="simple.aspx">
  8.         Name: <input type="text" name="Name" size="20"><br>
  9.         Address: <input type="text" name="Address" size="20"><br>
  10.         <input type="submit" value="Submit" name="B1">
  11.         <input type="reset" value="Reset" name="B2">
  12.     </form>
  13. </body>
  14. </html>

simple.aspx

Código ASP:
Ver original
  1. <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  6. <title>Untitled Document</title>
  7. </head>
  8. <body>
  9. <%
  10.  Dim strName as String
  11.  Dim strAddress as String
  12.  strName = Request.Form( "Name" )
  13.  strAddress = Request.Form( "Address" )
  14. %>
  15.  
  16. The name that was submitted was: <font color="red">
  17.  <%=strName%></font><br>
  18. The address that was submitted was: <font color="red">
  19.  <%=strAddress%></font><br>
  20. </body>
  21. </html>

Desde ya muchas gracias.
  #2 (permalink)  
Antiguo 29/06/2012, 08:43
Avatar de djaevi  
Fecha de Ingreso: marzo-2007
Ubicación: Moreno, Buenos Aires
Mensajes: 400
Antigüedad: 17 años, 1 mes
Puntos: 47
Respuesta: Enviar Simple Formulario

Bueno segui investigando y logre hacer funcionar asp con wampserver asi que el tema de conexion ya esta bien mi problema ahora es que al ejecutar un ejemplo de un archivo .aspx que consegui en internet me arroja el siguiente error:

XML Parsing Error: not well-formed
Location: file:///C:/SampleASP/default.aspx
Line Number 1, Column 2:


<%@ Page Language="VB" %>
-^


Este es el codigo de la pagina default.aspx:

Código ASP:
Ver original
  1. <%@ Page Language="VB" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html>
  4.    <head>
  5.       <link rel="stylesheet"href="intro.css" mce_href="intro.css">
  6.    </head>
  7.    <body>
  8.        <center>
  9.        <form action="index.aspx" method="post">
  10.            <h3> Name: <input id="Name" type=text>
  11.            Category:  <select id="Category" size=1>
  12.                           <option>One</option>
  13.                           <option>Two</option>
  14.                           <option>Three</option>
  15.                       </select>
  16.            </h3>
  17.            <input type=submit value="Lookup">
  18.            <p>
  19.            <% Dim I As Integer
  20.               For I = 0 to 7 %>
  21.               <font size="<%=I%>"> Sample ASP.NET TEST</font> <br>
  22.            <% Next %>
  23.        </form>
  24.        </center>
  25.    </body>
  26. </html>

Saludos y gracias

Etiquetas: formulario, net, simple, vb
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 03:19.