使用Querystring进行页面传值

源页面代码:
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim url As String
        url = "default3.aspx?name=" + TextBox1.Text + "&password=" + TextBox2.Text
        Response.Redirect(url)

    End Sub

目标页面代码:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Label1.Text = Request.QueryString("name")
        Label2.Text = Request.QueryString("password")
    End Sub 

 

缺点在于会在URL中显示你说传的数值`

你可能感兴趣的:(使用Querystring进行页面传值)