Bagikan melalui


PagesSection.MasterPageFile Properti

Definisi

Mendapatkan atau mengatur referensi ke halaman master untuk aplikasi.

public:
 property System::String ^ MasterPageFile { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("masterPageFile", DefaultValue="")]
public string MasterPageFile { get; set; }
[<System.Configuration.ConfigurationProperty("masterPageFile", DefaultValue="")>]
member this.MasterPageFile : string with get, set
Public Property MasterPageFile As String

Nilai Properti

Referensi ke halaman master untuk aplikasi.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan MasterPageFile properti .

// Get the current MasterPageFile property value.
Console.WriteLine(
    "Current MasterPageFile value: '{0}'",
    pagesSection.MasterPageFile);

// Set the MasterPageFile property to "MyMasterPage.ascx".
pagesSection.MasterPageFile = "MyMasterPage.ascx";
' Get the current MasterPageFile property value.
Console.WriteLine( _
    "Current MasterPageFile value: '{0}'", _
    pagesSection.MasterPageFile)

' Set the MasterPageFile property to "MyMasterPage.ascx".
pagesSection.MasterPageFile = "MyMasterPage.ascx"

Keterangan

Nilai properti ini dapat berupa jalur relatif atau absolut.

Berlaku untuk

Lihat juga