为什么QueryString取不到值?
我在WebForm1.aspx.vb中,添加了一个Button,并为其click事件添加了事件方法,如下所示:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'不同的用户给相应的页面
If TextBox1.Text = "1" Then
Response.Write("<script>window.open('frame1.aspx?page=frame1','','status=1,menubar=no,resizable=1,location=1,toolbar=no,scrollbars=no');</script>")
ElseIf TextBox1.Text = "2" Then
Response.Write("<script>window.open('frame2.aspx?page=frame2','','status=1,menubar=no,resizable=1,location=1,toolbar=no,scrollbars=no');</script>")
ElseIf TextBox1.Text = "3" Then
Response.Write("<script>window.open('frame1.aspx?page=frame3','','status=1,menubar=no,resizable=1,location=1,toolbar=no,scrollbars=no');</script>")
ElseIf TextBox1.Text = "4" Then
Response.Write("<script>window.open('frame2.aspx?page=frame4','','status=1,menubar=no,resizable=1,location=1,toolbar=no,scrollbars=no');</script>")
End If
Response.Write("<script >window.close()</script>")
End Sub
大家注意这一句话:
Response.Write("<script>window.open('frame1.aspx?page=frame1','','status=1,menubar=no,resizable=1,location=1,toolbar=no,scrollbars=no');</script>")
我在这里添加了参数“page=frame1”
可是我在另外一个页面中调用str = Request.QueryString("page")时,发现str为空,这是怎么回事啊?是不是在frame中不能添加参数呢?