Udostępnij przez


OutputCacheProfileCollection.Set(OutputCacheProfile) Metoda

Definicja

Ustawia określony OutputCacheProfile obiekt.

public:
 void Set(System::Web::Configuration::OutputCacheProfile ^ user);
public void Set (System.Web.Configuration.OutputCacheProfile user);
member this.Set : System.Web.Configuration.OutputCacheProfile -> unit
Public Sub Set (user As OutputCacheProfile)

Parametry

user
OutputCacheProfile

Element OutputCacheProfileCollection do ustawienia.

Wyjątki

Element OutputCacheProfileCollection jest tylko do odczytu.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać Set metody .

// Using method RemoveAt.
formsAuthenticationCredentials.Users.RemoveAt(0);

if (!authenticationSection.SectionInformation.IsLocked)
{
    configuration.Save();
}
' Using method RemoveAt.
formsAuthenticationCredentials.Users.RemoveAt(0)

If Not authenticationSection.SectionInformation.IsLocked Then
   configuration.Save()
End If

Uwagi

Metoda Set modyfikuje istniejący OutputCacheProfileCollection element.

Dotyczy

Zobacz też