怎么在子页面的后台获取showModalDialog传过来的参数(在线等)?
####父页面代码:#####
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
If (Not IsClientScriptBlockRegistered("clientScript")) Then
Dim strScript As String = "<script>" + vbCrLf
strScript += "function OpenWin(){" + vbCrLf
strScript += "var str=window.showModalDialog('WebForm2.aspx',document.Form1.TextBox1.value)" + vbCrLf
strScript += "if(str!=null) document.Form1.TextBox1.value=str" + vbCrLf
strScript += "}" + vbCrLf
strScript += "</script>" + vbCrLf
RegisterClientScriptBlock("clientScript", strScript)
End If
Session("AA") = TextBox1.Text
Button1.Attributes.Add("onclick", "OpenWin()")
End Sub
######子页面代码######:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
MyBody.Attributes.Add("onload", "document.Form1.TextBox1.value=window.parent.dialogArguments")
End If
End Sub
我怎么在子页面的Page_Load里取到父页面传过来的值呢?