Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save datetime
Message
From
02/03/2009 11:11:43
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01383958
Message ID:
01384989
Views:
36
>>>BTW, if you want to do this on the database level, see
>>>
>>>Last Updated User Thread #988451 (thanks Greg for recent reminder)
>>
>>Thanks Naomi. I figured it out.
>>
>>SqlDataSource2.UpdateParameters("DateCompleted").DefaultValue = Now()
>>
>
>I just thought of something, not 100% sure I'm right, but want you to test.
>
>Open your page. Check the current time. Sit for some time (say, 5 minutes) without doing anything. Then update your data and press Update button. What date would you have in your DateCompleted field? Would it be the current time or the time you opened your page?

Ran the test as you requested. It provides the time of the save not the time the page was opened. The code is in the Item_Updateing event
	Protected Sub FormView1_ItemUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles FormView1.ItemUpdating
		SqlDataSource2.UpdateParameters("DateCompleted").DefaultValue = Now()
	End Sub
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform