Results 1 to 3 of 3

Thread: populating textbox

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    populating textbox

    I have a pop up calendar that I use to populate txtBidOpenDate.Text. This works fine. What I'd like to do is populate a second textbox with a date that is seven days greater. I'm using the code below, which works fine. The problem is, I'd like the textbox to populate right away and not wait for a post back? Any Suggestions?

    txtIntDisEndDate.Text = DateAdd(DateInterval.Day, 7, CDate(txtBidOpenDate.Text))

  2. #2
    Addicted Member Halon's Avatar
    Join Date
    Oct 2002
    Location
    under desk choking on rage
    Posts
    228
    You could write a script and then in the 'onselectionchanged' property of the calendar call the function.

    VB Code:
    1. <script runat="server">    
    2. sub Set_Date(sender as Object,e as EventArgs)      
    3. txtIntDisEndDate.Text = DateAdd(DateInterval.Day, 7, CDate(txtBidOpenDate.Text))
    4. end sub        
    5. </script>
    Then in the <asp:calendar
    VB Code:
    1. <asp:calendar onselectionchanged="Set_Date" id="calCh.......

    Hope it helped
    Cheers
    Soylent Green tastes like chicken

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    what if the calendar is a different page?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width