protected void EntityDataSource1_Inserted(object sender, EntityDataSourceChangedEventArgs e) { if (e.Entity != null) { TPhotoAlbum myPhotoAlbum = (TPhotoAlbum)e.Entity; Response.Redirect(string.Format("ManagePhotoAlbum.aspx?PhotoAlbumID={0}", myPhotoAlbum.ID.ToString())); } }
protected void EntityDataSource1_Inserting(object sender, EntityDataSourceChangingEventArgs e) { TPhotoAlbum myPhotoAlbum = (TPhotoAlbum)e.Entity; myPhotoAlbum.strUserName = User.Identity.Name; }