<mobileControls>
更新:2007 年 11 月
定義將 ASP.NET Mobile 控制項對應到 Web.config 檔 <system.web> 區段內之對應配接器 (Adapter) 的配接器集。
<system.web>
<mobileControls
allowCustomAttributes="true|false"
sessionStateHistorySize="historySize"
cookielessDataDictionaryType="System.Web.Mobile.CookielessData"|"">
<device
name="name"
inheritsFrom="parentAdapterSet"
predicateClass="predicateClass"
predicateMethod="predicateMethod"
pageAdapter="pageAdapterClass">
<control name="controlClass" adapter="adapterClass" />
... More controls here.
</device>
</mobileControls>
</system.web>
備註
行動控制項組態設定也提供 ASP.NET Mobile Web 網頁的一般組態設定。所有行動控制項都允許您使用 ASP.NET Web 網頁的 IAttributeAccessor 介面來設定自訂控制項屬性 (Attribute)。這個介面提供 GetAttribute 和 SetAttribute 方法。此外,MobileControl 類別 (Class) 會公開 (Expose) CustomAttributes 字典。如需自訂屬性的詳細資訊,請參閱行動控制項的自訂屬性。如需如何建立和設定配接器的詳細資訊,請參閱加入新裝置配接器和裝置支援。
下表定義 <mobileControls> 項目的屬性。
屬性 |
描述 |
---|---|
allowCustomAttributes |
指定頁面是否可以有自訂屬性。 |
sessionStateHistorySize |
指定用來在伺服器工作階段 (Session) 中保存應用程式檢視狀態之歷程記錄的大小。如需詳細資訊,請參閱了解狀態管理。 |
cookielessDataDictionaryType |
指定能維護 Cookieless 表單驗證 (Authentication) 索引鍵的字典類別。若要關閉這個行為,請將此值設定為空字串 ("")。 |