Sdílet prostřednictvím


SystemWebSectionGroup.WebParts Vlastnost

Definice

webParts Získá oddíl.

public:
 property System::Web::Configuration::WebPartsSection ^ WebParts { System::Web::Configuration::WebPartsSection ^ get(); };
[System.Configuration.ConfigurationProperty("webParts")]
public System.Web.Configuration.WebPartsSection WebParts { get; }
[<System.Configuration.ConfigurationProperty("webParts")>]
member this.WebParts : System.Web.Configuration.WebPartsSection
Public ReadOnly Property WebParts As WebPartsSection

Hodnota vlastnosti

WebPartsSection

Objekt WebPartsSection odkazuje na webParts část konfiguračního souboru.

Atributy

Příklady

Následující příklad kódu ukazuje, jak získat WebPartsSection objekt z konfiguračního souboru existující webové aplikace.

// Get the webParts section.
WebPartsSection webParts =
    systemWeb.WebParts;
// Read section information.
info =
    webParts.SectionInformation;

name = info.SectionName;
type = info.Type;
declared = info.IsDeclared.ToString();
msg = String.Format(
    "Name:     {0}\nDeclared: {1}\nType:     {2}\n",
    name, declared, type);
' Get the webParts section.
Dim webParts _
As WebPartsSection = systemWeb.WebParts
' Read section information.
info = webParts.SectionInformation

name = info.SectionName
type = info.Type
declared = info.IsDeclared.ToString()
msg = String.Format("Name:     {0}" + _
ControlChars.Lf + "Declared: {1}" + _
ControlChars.Lf + "Type:     {2}" + _
ControlChars.Lf, name, declared, type)

Platí pro

Viz také