Referring to a textbox within a web control within an aspx

Discussion in 'ASP .Net' started by KatB, Apr 22, 2005.

  1. KatB

    KatB Guest

    Hi, I have a web control (ucTickets) in an asp.net 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
    System.EventArgs)

    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

    *** Sent via Developersdex http://www.developersdex.com ***
     
    KatB, Apr 22, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    Referring to a textbox within an ItemTemplate

    VB Programmer, Nov 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    5,433
    cbDevelopment
    Nov 18, 2005
  2. S_K
    Replies:
    1
    Views:
    416
    IfThenElse
    Oct 2, 2007
  3. S_K
    Replies:
    0
    Views:
    392
  4. Adam Nielsen
    Replies:
    3
    Views:
    1,348
    Kai-Uwe Bux
    Oct 10, 2007
  5. lowerbackpain
    Replies:
    0
    Views:
    331
    lowerbackpain
    Feb 19, 2009
Loading...

Share This Page