944,196 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1739
  • ASP.NET RSS
May 25th, 2007
0

how to autogenerate date

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Shruthi_R is offline Offline
12 posts
since Apr 2007
May 25th, 2007
0

Re: how to autogenerate date

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
Reputation Points: 10
Solved Threads: 2
Newbie Poster
kokkee is offline Offline
20 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Change my display name
Next Thread in ASP.NET Forum Timeline: oleDbCommand - Update





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC