Referring to a textbox within a web control within an aspx



Hi, I have a web control (ucTickets) in an page (MasterPage).
From ucTickets, I open a calendar popup window to which I pass a
control.value (which textbox to fill with the date).

I've always used a change event in the calendar aspx as follows:

Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As

Dim strScript As String = "<script>window.opener.document.Form(0)." +
control.Value + ".value = '"
strScript += calDate.SelectedDate.ToString("MM/dd/yyyy")
strScript += "';self.close()"
strScript += "</" + "script>"
RegisterClientScriptBlock("anything", strScript)

End Sub

I know the problem is with the reference back to the (window.opener)
form, but don't know how to fix it. The textbox now resides in a control
in the form. I've tried different variations with no luck.

Any suggestions much appreciated.

Thanks, Kat


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question