Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save datetime
Message
De
02/03/2009 11:11:43
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
01383958
Message ID:
01384989
Vues:
35
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform