Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/04/2008, 12:46
Avatar de magosc
magosc
 
Fecha de Ingreso: diciembre-2006
Mensajes: 72
Antigüedad: 18 años, 1 mes
Puntos: 0
Re: pasar paremetros d pagina 1 a pagina 2

hola roger1187, checate esto, espero te sirva:
para la pagina 1:
Código:
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim parametro1


        parametro1 = para1.Text

        Response.Redirect("pagina2.aspx?parametro1=" & parametro1)
   
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="para1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Enviar" /></div>
    </form>
</body>
</html>
y para la pagina 2:
Código:
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Sub Page_Load(ByVal sender1 As Object, ByVal e1 As EventArgs)
        Dim valor1 As String
        valor1 = Request.QueryString(0)
        Label1.Text = valor1
        
    End Sub
</script>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form2" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server"></asp:Label>&nbsp;</div>
    </form>
</body>
</html>
saludos...