Hello Imar,
Could you explain why in AddEditReviews you use
Code:
protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
e.Values["UpdateDateTime"] = DateTime.Now;
}
and in NewPhotoAlbum you use
Code:
protected void LinqDataSource1_Inserting(object sender, LinqDataSourceInsertEventArgs e)
{
PhotoAlbum myPhotoAlbum = (PhotoAlbum)e.NewObject;
myPhotoAlbum.UserName = User.Identity.Name;
}
couldn't you in the last case just as well have used
Code:
protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
e.Values["UserName"] = User.Identity.Name;
}
The thing is that I am a bit confused when to use which eventhandler.
Here in both cases the LinqDs is connected to a DetailsView, and I noticed that in ManagePhotoAlbum, that you prefer to use LinqDataSource_inserting for inserting the imageUrl.
So what's the rule here?
Best regards, Robin