Using the ProfileAutoSaving event to turn off the auto-saving feature : Event « Profile « ASP.NET Tutorial






VB version

Public Sub Profile_ProfileAutoSaving(sender As Object, _
  args As ProfileAutoSaveEventArgs)
    
    If Profile.PaidDueStatus.HasChanged Then
      args.ContinueWithProfileAutoSave = True
    Else
      args.ContinueWithProfileAutoSave = False
    End If
End Sub
   
C# version

public void Profile_ProfileAutoSaving(object sender, ProfileAutoSaveEventArgs args)
{
    if (Profile.PaidDueStatus.HasChanged)
      args.ContinueWithProfileAutoSave = true;
    else
      args.ContinueWithProfileAutoSave = false;
}








15.4.Event
15.4.1.Using the ProfileAutoSaving event to turn off the auto-saving feature