Sdílet prostřednictvím


PagesSection.MasterPageFile Vlastnost

Definice

Získá nebo nastaví odkaz na stránku předlohy aplikace.

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

Hodnota vlastnosti

String

Odkaz na stránku předlohy pro aplikaci.

Atributy

Příklady

Následující příklad kódu ukazuje, jak použít MasterPageFile vlastnost.

// 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"

Poznámky

Hodnota této vlastnosti může být relativní nebo absolutní cesta.

Platí pro

Viz také