|
■No61087 (pico さん) に返信 自力で解決しました
一応ソースを載せます 親画面側 Default.aspx.vb Protected Sub button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button.Click '画面遷移() Dim scriptStr As String scriptStr = "<script type='text/javascript'>" scriptStr += "window.open('TestDefault.aspx','_blank'," scriptStr += "'location=no,toolbar=no," scriptStr += "menubar=no," scriptStr += "scrollbars=yes," scriptStr += "status=yes," scriptStr += "resizable=yes," scriptStr += "width=1000," scriptStr += "height = 800 ');" scriptStr += "</script>"
ClientScript.RegisterStartupScript(Me.GetType(), "検索画面", scriptStr)
End Sub
子画面側 Protected Sub GridView_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView.RowCommand
Dim strcode As String = GridView3.Rows(CInt(e.CommandArgument)).Cells(1).Text Dim strname As String = GridView3.Rows(CInt(e.CommandArgument)).Cells(2).Text Dim scriptStr As String = String.Empty
scriptStr = "<script type='text/javascript'>" scriptStr += "window.opener.document.getElementById(コード').value='" & strcode & "';" scriptStr += "window.opener.document.getElementById(名前').value='" & strname & "';" scriptStr += "window.close();" scriptStr += "</script>" ClientScript.RegisterClientScriptBlock(Me.GetType(), "newwindow", scriptStr)
End Sub
|