Share via


PagesSection.MasterPageFile Proprietà

Definizione

Ottiene o imposta un riferimento alla pagina master dell'applicazione.

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

Valore della proprietà

String

Riferimento alla pagina master dell'applicazione.

Attributi

Esempio

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà MasterPageFile.

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

Commenti

Il valore di questa proprietà può essere un percorso relativo o assoluto.

Si applica a

Vedi anche