Bagikan melalui


SystemWebSectionGroup.WebParts Properti

Definisi

Mendapatkan bagian .webParts

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

Nilai Properti

Objek WebPartsSection mengacu pada bagian webParts file konfigurasi.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mendapatkan WebPartsSection objek dari file konfigurasi aplikasi Web yang ada.

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

Berlaku untuk

Lihat juga