This topic has not yet been rated - Rate this topic

SPWebConfigModification.Name Property

Gets or sets the name of the attribute or section node that should be set.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
public string Name { get; set; }

Property Value

Type: System.String
A string that contains the name of the attribute or section node.

When the type of web.config modification is EnsureChildNode, the Name property refers to an XPath expression that uniquely identifies the node under the parent node, as identified by the Path property. For example, to ensure a child node as a safe control entry, which has two unique attributes (e.g., Assembly and TypeName), the name should match the following XPath expression:

SafeControl[@Assembly=\"Microsoft.Sharepoint\"][@TypeName=\"*\"]

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ