Partilhar via


SystemWebSectionGroup.WebParts Propriedade

Definição

Obtém a seção 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

Valor da propriedade

WebPartsSection

O WebPartsSection objeto refere-se à webParts seção do arquivo de configuração.

Atributos

Exemplos

O exemplo de código a seguir mostra como obter o WebPartsSection objeto do arquivo de configuração de um aplicativo Web existente.

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

Aplica-se a

Confira também