PartialCachingAttribute.VaryByParams 속성

정의

출력 캐시가 사용자 정의 컨트롤을 변경하는 데 사용하는 쿼리 문자열이나 폼 POST 매개 변수의 목록을 가져옵니다.

public:
 property System::String ^ VaryByParams { System::String ^ get(); };
public:
 property System::String ^ VaryByParams { System::String ^ get(); void set(System::String ^ value); };
public string VaryByParams { get; }
public string VaryByParams { get; set; }
member this.VaryByParams : string
member this.VaryByParams : string with get, set
Public ReadOnly Property VaryByParams As String
Public Property VaryByParams As String

속성 값

String

쿼리 문자열이나 폼 POST 매개 변수의 목록입니다.

예제

다음 코드 예제에서는 생성자를 사용자 정의 컨트롤에 적용할 수 있는 방법을 PartialCachingAttribute(Int32, String, String, String) 보여 줍니다. 이 예제에서 생성자는 사용자 컨트롤을 캐시할 수 있음을 나타내고 캐시 항목이 종속되는 매개 변수를 지정하는 데 사용됩니다.

// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByParams
// property to ctlSelect.country, the full name of the form 
// POST parameter generated by the country DropDownList control.
[PartialCaching(20, "ctlSelect.country", null, null)]
public partial class ctlSelect : UserControl
' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByParams
' property to ctlSelect.country, the full name of the form 
' POST parameter generated by the country DropDownList control.
<PartialCaching(20, "ctlSelect.country", Nothing, Nothing)> _
Public Class ctlSelect
    Inherits UserControl

적용 대상