ProfileManager.AddDynamicProfileProperty(ProfilePropertySettings) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
以程式化方式新增一個設定檔屬性。
public:
static void AddDynamicProfileProperty(System::Web::Configuration::ProfilePropertySettings ^ property);
public static void AddDynamicProfileProperty(System.Web.Configuration.ProfilePropertySettings property);
static member AddDynamicProfileProperty : System.Web.Configuration.ProfilePropertySettings -> unit
Public Shared Sub AddDynamicProfileProperty (property As ProfilePropertySettings)
參數
- property
- ProfilePropertySettings
屬性設定將被加入。
備註
此方法在功能上等同於將屬性加入設定檔的區 profile 段。 要呼叫此方法來新增 profile 屬性,您必須在標有屬性 PreApplicationStartMethodAttribute 的方法中呼叫。