WebPartsPersonalization Class
.NET Framework 3.0
Allows you to specify the personalization provider and set personalization authorizations. This class cannot be inherited.
Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
This example demonstrates how to specify values declaratively for several attributes of the webParts section, which can also be accessed as members of the WebPartsPersonalization class.
The following configuration file example shows how to specify values declaratively for the webParts section.
<system.web>
<webParts>
<personalization
defaultProvider="AspNetSqlPersonalizationProvider">
<!—- Providers may only be defined at the
application level -->
<providers>
<add name="AspNetSqlPersonalizationProvider"
type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"
connectionStringName="LocalSqlServer"
applicationName="/" />
</providers>
<authorization>
<deny users="*" verbs="enterSharedScope" />
<allow users="*" verbs="modifyState" />
</authorization>
</personalization>
</webParts>
</system.web>
The following code example demonstrates how to use the WebPartsPersonalization class.
This code example is part of a larger example provided for the WebPartsSection class.
System.Object
System.Configuration.ConfigurationElement
System.Web.Configuration.WebPartsPersonalization
System.Configuration.ConfigurationElement
System.Web.Configuration.WebPartsPersonalization
Community Additions
ADD
Show: