ASP.NET Tutorial/Profile/Event

Материал из .Net Framework эксперт
Версия от 12:00, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Using the ProfileAutoSaving event to turn off the auto-saving feature

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;
}