R
ruca
Hi,
Can anyone tell me please how can I return values from a popup to a
UserControl. I use the same "method" like to return to a WebForm, but it not
works in UserControl case.
I have this code to return from popup to webform:
------------------------------------------------------------------------
sbScript.Append("<script language='javascript'>")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcA"))
sbScript.Append("'].value = '")
sbScript.Append(strYear)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcM"))
sbScript.Append("'].value = '")
sbScript.Append(strMonth)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcD"))
sbScript.Append("'].value = '")
sbScript.Append(strDay)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.close();")
sbScript.Append(Environment.NewLine)
sbScript.Append("</script>")
RegisterStartupScript("CloseDate", sbScript.ToString())
------------------------------------------------------------------------
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca
Can anyone tell me please how can I return values from a popup to a
UserControl. I use the same "method" like to return to a WebForm, but it not
works in UserControl case.
I have this code to return from popup to webform:
------------------------------------------------------------------------
sbScript.Append("<script language='javascript'>")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcA"))
sbScript.Append("'].value = '")
sbScript.Append(strYear)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcM"))
sbScript.Append("'].value = '")
sbScript.Append(strMonth)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.opener.document.forms[0].elements['")
sbScript.Append(Request.QueryString("srcD"))
sbScript.Append("'].value = '")
sbScript.Append(strDay)
sbScript.Append("';")
sbScript.Append(Environment.NewLine)
sbScript.Append("window.close();")
sbScript.Append(Environment.NewLine)
sbScript.Append("</script>")
RegisterStartupScript("CloseDate", sbScript.ToString())
------------------------------------------------------------------------
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca