how to autogenerate date

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2007
Posts: 12
Reputation: Shruthi_R is an unknown quantity at this point 
Solved Threads: 0
Shruthi_R Shruthi_R is offline Offline
Newbie Poster

how to autogenerate date

 
0
  #1
May 25th, 2007
i am using a gridviw to display values from database
and using formview to insert values to gridview
i have the following fields in formview during insert mode like
Name :
StartDate:
EndDate:
now when i enter the startdate
the Enddate should automatically add 7 days to startdate and get inserted
if its textbox i know we can add like
DateTime.Now.Add(7);
but for a field in formview is it possible to do that
plz help me on this regard
Shruthi
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 20
Reputation: kokkee is an unknown quantity at this point 
Solved Threads: 2
kokkee kokkee is offline Offline
Newbie Poster

Re: how to autogenerate date

 
0
  #2
May 25th, 2007
you already know about the end date will be 7 day after startdate. you can call a store procedure when you need to insert the data to database, in the store procedure you can make it automatic add 7 day on the end date. this is another way to insert but the result will be same.

i also have another idea, that is using javascript or ajax to add it automatic. after u key in the startdate, you add in a event on start date and when you key in the start date. it will call up js and javascript to assign a new value to end date.

hope it can help you
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC