Hi Mori,
Once you start using master pages and containers, the names of the controls
change dramatically. You need to use the name that ASP.NET gives the
control. You can get that by using the control's ClientID property.
At also means you need to create the JavaScript dynamically.
Here's the idea:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled
Page" %>
<script runat="server">
Protected Sub Page_Load _
(ByVal sender As Object, ByVal e As System.EventArgs)
Page.ClientScript.RegisterStartupScript _
(Me.GetType, "cal", "document.forms[0]." & _
txtDate.ClientID & ".value='3/20/2006';", True)
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:textbox id="txtDate" runat="server"></asp:textbox>
</asp:Content>
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
"Mori" <Mo**@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
I am using a popup Calendar to populate a textbox. When the textbox is on
a
form without content control, it works fine. the script
is:<script>window.opener.document.forms(0).txtDate .value
='3/20/2006';self.close()</script>
However, when the textbox is within a content control, it does not work.
I
changed the script to
<script>window.opener.document.Content(0).txtDate. value
='3/13/2006';self.close()</script> still not working.