N
Nayo
Guest
I have the VB code written below but it still does not work
Imports System.Web.UI.HtmlControls.HtmlGenericControl
Partial Class PopUp
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
control.Value = Request.QueryString("textbox").ToString()
End Sub
Protected Sub Change_Date(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calender1.SelectionChanged
Dim strScript As String = "<script>window.opener.document.forms(0)." + control.Value + ".value = '"
strScript += Calender1.SelectedDate.ToString("MM/dd/yyyy")
strScript += "';self.close()"
strScript += "</" + "script>"
If (Not Page.ClientScript.IsClientScriptBlockRegistered(Me.GetType(), "Calendar1_ChangeDate")) Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Calendar1_ChangeDate", strScript)
End If
End Sub
End Class
Imports System.Web.UI.HtmlControls.HtmlGenericControl
Partial Class PopUp
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
control.Value = Request.QueryString("textbox").ToString()
End Sub
Protected Sub Change_Date(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calender1.SelectionChanged
Dim strScript As String = "<script>window.opener.document.forms(0)." + control.Value + ".value = '"
strScript += Calender1.SelectedDate.ToString("MM/dd/yyyy")
strScript += "';self.close()"
strScript += "</" + "script>"
If (Not Page.ClientScript.IsClientScriptBlockRegistered(Me.GetType(), "Calendar1_ChangeDate")) Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Calendar1_ChangeDate", strScript)
End If
End Sub
End Class