锅炉的汽水系统流程图:VB。NET里Response.Redirect传递参数怎么传啊????

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/02 18:25:04
比如这段
Dim userID As String = Request.Form("userid")
Response.Redirect("stmain.aspx?xingming=userID ")
这样能在 stmain.aspx.vb里使用 xingmiang这个变量吗?

Response.Redirect是重定向到新的url,这个是asp.net中的吧
若想传递参数,只要在url上加"?名称=值&名称2=值2"
例如
Reasponse.Redirect("chklogin.asp?username=testuser&password=testpass")
这样,就把"testuser"和"testpass"传递到chklogin.asp了
在chklogin.asp中,加入"变量=Request.QueryString("username")"和"变量=Request.QueryString("password")"就可以取出这两个值了

应该这样:
Dim userID As String = Request.Form("userid")
Response.Redirect("stmain.aspx?xingming=" &userID)

在接收的文件里面:
dim xingming as string =Request.form("xingming")

就可以了。

跟asp的一样的,仔细看一下,网址穿值方法是同样的