StyleSheet 類別

定義

警告

The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.

組織會套用到其他控制項的樣式。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

public ref class StyleSheet : System::Web::UI::MobileControls::MobileControl
public class StyleSheet : System.Web.UI.MobileControls.MobileControl
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class StyleSheet : System.Web.UI.MobileControls.MobileControl
type StyleSheet = class
    inherit MobileControl
[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]
type StyleSheet = class
    inherit MobileControl
Public Class StyleSheet
Inherits MobileControl
繼承
屬性

範例

下列範例示範如何在事件期間Page_Load將 Style 屬性新增至StyleSheet控件。

<%@ Page Language="C#" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>
<%@ Import Namespace="System.Web.UI.MobileControls" %>
<%@ Import Namespace="System.Drawing" %>

<script runat="server">
    protected void Page_Load(Object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            StyleSheet1["Style1"].ForeColor = Color.Red;
            StyleSheet1["Style1"].Font.Size = 
                System.Web.UI.MobileControls.FontSize.Large;
            StyleSheet1["Style1"].Font.Bold = BooleanOption.True;
            StyleSheet1["Style1"].Font.Italic = BooleanOption.True;
            StyleSheet1["Style2"].ForeColor = Color.Blue;
            StyleSheet1["Style2"].Font.Size = 
                System.Web.UI.MobileControls.FontSize.Normal;
            StyleSheet1["Style2"].Font.Bold = BooleanOption.False;
            StyleSheet1["Style2"].Font.Italic = BooleanOption.True;
            StyleSheet1["Style3"].ForeColor = Color.Green;
            StyleSheet1["Style3"].Font.Size = 
                System.Web.UI.MobileControls.FontSize.Small;
            StyleSheet1["Style3"].Font.Bold = BooleanOption.False;
            StyleSheet1["Style3"].Font.Italic = BooleanOption.False;
        }
    }

    void SelectStyle(object sender, EventArgs e)
    {
        // Retrieve the style name as a string.
        String myStyle = SelectionList1.Selection.ToString();

        // Match the style name and apply the style to TextView1.
        switch (myStyle)
        {
            case "hot":
                TextView1.StyleReference = "Style1";
                break;
            case "medium":
                TextView1.StyleReference = "Style2";
                break;
            case "mild":
                TextView1.StyleReference = "Style3";
                break;
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:StyleSheet id="StyleSheet1" runat="server">
        <mobile:Style Name="Style1" Font-Name="Arial"
            BackColor="#E0E0E0" Wrapping="Wrap">
        </mobile:Style>
        <mobile:Style Name="Style2" Font-Name="Arial"
            BackColor="blue" Wrapping="NoWrap">
        </mobile:Style>
        <mobile:Style Name="Style3" Font-Name="Arial Narrow"
            BackColor="Green" Wrapping="NoWrap">
        </mobile:Style>
    </mobile:StyleSheet>

    <mobile:Form id="Form1" runat="server">
        <mobile:Label id="Label1" runat="server" 
            Text="Today's Special" StyleReference="title" />
        <mobile:TextView id="TextView1" runat="server" 
            StyleReference="Style1">Chili
        </mobile:TextView>
        <mobile:SelectionList runat="server" id="SelectionList1">
           <item Text="hot" Value="hot"/>
           <item Text="medium" Value="medium"/>
           <item Text="mild" Value="mild"/>
        </mobile:SelectionList>
        <mobile:Command ID="Command1" runat="server" 
           Text="Select Style" OnClick="SelectStyle" />
    </mobile:Form>
</body>
</html>
<%@ Page Language="VB" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>
<%@ Import Namespace="System.Web.UI.MobileControls" %>
<%@ Import Namespace="System.Drawing" %>

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsPostBack Then
            StyleSheet1("Style1").ForeColor = Color.Red
            StyleSheet1("Style1").Font.Size = _
                System.Web.UI.MobileControls.FontSize.Large
            StyleSheet1("Style1").Font.Bold = BooleanOption.True
            StyleSheet1("Style1").Font.Italic = BooleanOption.True
            StyleSheet1("Style2").ForeColor = Color.Blue
            StyleSheet1("Style2").Font.Size = _
                System.Web.UI.MobileControls.FontSize.Normal
            StyleSheet1("Style2").Font.Bold = BooleanOption.False
            StyleSheet1("Style2").Font.Italic = BooleanOption.True
            StyleSheet1("Style3").ForeColor = Color.Green
            StyleSheet1("Style3").Font.Size = _
                System.Web.UI.MobileControls.FontSize.Small
            StyleSheet1("Style3").Font.Bold = BooleanOption.False
            StyleSheet1("Style3").Font.Italic = BooleanOption.False
        End If
    End Sub

    Private Sub SelectStyle(ByVal sender As Object, _
        ByVal e As EventArgs)

        ' Retrieve the style name as a string.
        Dim myStyle As String = SelectionList1.Selection.ToString()

        ' Match the style name and apply the style to TextView1.
        Select Case myStyle
            Case "hot"
                TextView1.StyleReference = "Style1"
            Case "medium"
                TextView1.StyleReference = "Style2"
            Case "mild"
                TextView1.StyleReference = "Style3"
        End Select
    End Sub
</script>

<html xmlns="http:'www.w3.org/1999/xhtml" >
<body>
    <mobile:StyleSheet id="StyleSheet1" runat="server">
        <mobile:Style Name="Style1" Font-Name="Arial"
            BackColor="#E0E0E0" Wrapping="Wrap">
        </mobile:Style>
        <mobile:Style Name="Style2" Font-Name="Arial"
            BackColor="blue" Wrapping="NoWrap">
        </mobile:Style>
        <mobile:Style Name="Style3" Font-Name="Arial Narrow"
            BackColor="Green" Wrapping="NoWrap">
        </mobile:Style>
    </mobile:StyleSheet>

    <mobile:Form id="Form1" runat="server">
        <mobile:Label id="Label1" runat="server" 
            Text="Today's Special" StyleReference="title" />
        <mobile:TextView id="TextView1" runat="server" 
            StyleReference="Style1">Chili
        </mobile:TextView>
        <mobile:SelectionList runat="server" id="SelectionList1">
           <item Text="hot" Value="hot"/>
           <item Text="medium" Value="medium"/>
           <item Text="mild" Value="mild"/>
        </mobile:SelectionList>
        <mobile:Command ID="Command1" runat="server" 
           Text="Select Style" OnClick="SelectStyle" />
    </mobile:Form>
</body>
</html>

備註

StyleSheet控制項可以包含任意數目的樣式物件,或繼承自 Style 類別的更特製化樣式物件。 這些屬性應該具有唯一的名稱屬性。 然後,您可以依其 Name 屬性參考相同頁面上的其他控件。 這個類別沒有視覺表示。

頁面也可以使用外部樣式表單,而數個頁面可以共用相同的外部樣式表單。 如需樣式的詳細資訊,請參閱 <樣式> 專案和 Styles 主題。

注意

控件會忽略自己的樣式屬性;設定 StyleSheet 本身的樣式屬性 StyleSheet 不會影響控件內 StyleSheet 包含的子系樣式。

建構函式

StyleSheet()
已淘汰.

初始化 StyleSheet 類別的新執行個體。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

屬性

Adapter
已淘汰.

針對控制項傳回裝置的特定配置器。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
Alignment
已淘汰.

取得或設定樣式的指定對齊方式。 預設值是 NotSet。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

AppRelativeTemplateSourceDirectory
已淘汰.

取得或設定包含了此控制項之 PageUserControl 物件的相對應用程式虛擬目錄。

(繼承來源 Control)
BackColor
已淘汰.

取得或設定控制項的背景色彩。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

BindingContainer
已淘汰.

取得包含了此控制項之資料繫結的控制項。

(繼承來源 Control)
BreakAfter
已淘汰.

取得或設定屬性,這個屬性決定控制項之後是否呈現其他尾端分行符號。 這個分行符號會使後續內容從下一行開始。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

ChildControlsCreated
已淘汰.

取得值,指出是否已經建立伺服器控制項的子控制項。

(繼承來源 Control)
ClientID
已淘汰.

取得 ASP.NET 所產生之 HTML 標記的控制項識別碼。

(繼承來源 Control)
ClientIDMode
已淘汰.

取得或設定用來產生 ClientID 屬性值的演算法。

(繼承來源 Control)
ClientIDSeparator
已淘汰.

取得字元值,表示在 ClientID 屬性中所使用的分隔字元。

(繼承來源 Control)
Context
已淘汰.

取得與目前 Web 要求的伺服器控制項關聯的 HttpContext 物件。

(繼承來源 Control)
Controls
已淘汰.

取得 ControlCollection 物件,表示 UI 階層架構中指定之伺服器控制項的子控制項。

(繼承來源 Control)
CustomAttributes
已淘汰.

傳回一組針對控制項定義的自訂屬性 (Attribute)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
DataItemContainer
已淘汰.

如果命名容器實作 IDataItemContainer,則取得命名容器的參考。

(繼承來源 Control)
DataKeysContainer
已淘汰.

如果命名容器實作 IDataKeysControl,則取得命名容器的參考。

(繼承來源 Control)
Default
已淘汰.

傳回預設樣式表。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

DesignMode
已淘汰.

取得值,指出控制項是否正用於設計介面上。

(繼承來源 Control)
DeviceSpecific
已淘汰.

取得或設定與控制項關聯的 DeviceSpecific/Choice 建構。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
EnableTheming
已淘汰.

取得值,指出主題是否套用至此控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
EnableViewState
已淘汰.

取得或設定值,該值表示伺服器控制項是否對要求的用戶端而言保持其檢視狀態,以及它包含的任何子控制項狀態。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

Events
已淘汰.

取得控制項事件處理常式委派 (Delegate) 的清單。 這個屬性是唯讀的。

(繼承來源 Control)
FirstPage
已淘汰.

傳回會出現這個控制項之表單的第一頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
Font
已淘汰.

傳回 FontInfo 物件,該物件包含控制項的字型相關資訊。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

ForeColor
已淘汰.

取得或設定樣式的指定前景色彩。 通常這個屬性會設定文字的色彩。 預設值是 Empty。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

Form
已淘汰.

可用來存取包含表單。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
HasChildViewState
已淘汰.

取得值,指出目前伺服器控制項的子控制項是否有任何已儲存的檢視狀態設定。

(繼承來源 Control)
ID
已淘汰.

取得或設定指派給伺服器控制項的程式設計識別項。

(繼承來源 Control)
IdSeparator
已淘汰.

取得用來分隔控制項識別項的字元。

(繼承來源 Control)
InnerText
已淘汰.

傳回控制項內的文字。 內部文字可能是來自子控制項的文字組合。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
IsChildControlStateCleared
已淘汰.

取得值,指出這個控制項中所包含的控制項是否有控制項狀態。

(繼承來源 Control)
IsTemplated
已淘汰.

取得值,指出 MobileControl 物件是否有現用的樣板集。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
IsTrackingViewState
已淘汰.

取得值,指出伺服器控制項是否正在儲存檢視狀態的變更。

(繼承來源 Control)
IsViewStateEnabled
已淘汰.

取得值,指出這個控制項是否已啟用檢視狀態。

(繼承來源 Control)
Item[String]
已淘汰.

依名稱順序取得或設定樣式表中的 Style 物件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

LastPage
已淘汰.

傳回顯示所指定控制項之表單的最後一頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
LoadViewStateByID
已淘汰.

取得值,指出控制項是否依 ID (而不是索引) 參與載入其檢視狀態。

(繼承來源 Control)
MobilePage
已淘汰.

傳回所包含的頁面。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
NamingContainer
已淘汰.

取得伺服器控制項命名容器的參考,其建立唯一命名空間,在具有相同 ID 屬性值的伺服器控制項之間作區別。

(繼承來源 Control)
Page
已淘汰.

取得含有伺服器控制項的 Page 執行個體的參考。

(繼承來源 Control)
PaginateChildren
已淘汰.

取得值,指出是否必須對控制項的子系進行分頁。 用於表單編頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
Parent
已淘汰.

在網頁控制階層架構中取得伺服器控制項之父控制項的參考。

(繼承來源 Control)
ReferencePath
已淘汰.

取得或設定使用者控制項 (User Control) (.ascx 檔) 的參考。 預設值是 null。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

RenderingCompatibility
已淘汰.

取得值,這個值會指定將與呈現 HTML 相容的 ASP.NET 版本。

(繼承來源 Control)
Site
已淘汰.

當呈現在設計介面上時,取得裝載目前控制項之容器的資訊。

(繼承來源 Control)
SkinID
已淘汰.

取得要套用至控制項的面板 ID。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
Style
已淘汰.

取得控制項的樣式。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
StyleReference
已淘汰.

取得或設定控制項的樣式屬性參考。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

Styles
已淘汰.

傳回樣式表中的樣式集合。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

TemplateControl
已淘汰.

取得或設定包含了此控制項之樣板的參考。

(繼承來源 Control)
TemplateSourceDirectory
已淘汰.

取得包含目前伺服器控制項的 PageUserControl 的虛擬目錄。

(繼承來源 Control)
UniqueID
已淘汰.

取得伺服器控制項唯一的、符合階層架構的識別項。

(繼承來源 Control)
ValidateRequestMode
已淘汰.

取得或設定值,指出控制項是否對來自瀏覽器的用戶端輸入檢查潛在的危險值。

(繼承來源 Control)
ViewState
已淘汰.

取得狀態資訊的字典,允許您在相同網頁的多個要求之間,儲存和還原伺服器控制項的檢視狀態。

(繼承來源 Control)
ViewStateIgnoresCase
已淘汰.

取得值,指出 StateBag 物件是否不區分大小寫。

(繼承來源 Control)
ViewStateMode
已淘汰.

取得或設定這個控制項的檢視狀態模式。

(繼承來源 Control)
Visible
已淘汰.

取得或設定值,指出伺服器控制項是否會轉譯為頁面上的 UI。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

VisibleWeight
已淘汰.

以字元方式取得控制項的近似權重。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
Wrapping
已淘汰.

取得或設定樣式的指定換行模式。 預設值是 NotSet。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

方法

AddedControl(Control, Int32)
已淘汰.

在子控制項加入 Control 物件的 Controls 集合後呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
AddLinkedForms(IList)
已淘汰.

在提供的清單中加入一組表單,其中包含指定控制項的連結。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
AddParsedSubObject(Object)
已淘汰.

告知伺服器控制項已經剖析項目,並將該項目加入至伺服器控制項的 Controls 屬性。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

ApplyStyleSheetSkin(Page)
已淘汰.

將頁面樣式表中所定義的樣式屬性套用至控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
BeginRenderTracing(TextWriter, Object)
已淘汰.

開始進行轉譯資料的設計階段追蹤。

(繼承來源 Control)
BuildProfileTree(String, Boolean)
已淘汰.

收集伺服器控制項的相關資訊,並在頁面啟用追蹤時將此資訊傳遞至 Trace 屬性以顯示之。

(繼承來源 Control)
Clear()
已淘汰.

清除集合。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

ClearCachedClientID()
已淘汰.

將快取的 ClientID 值設定為 null

(繼承來源 Control)
ClearChildControlState()
已淘汰.

刪除伺服器控制項之子控制項的控制項狀態資訊。

(繼承來源 Control)
ClearChildState()
已淘汰.

刪除所有伺服器控制項之子控制項的檢視狀態和控制項狀態資訊。

(繼承來源 Control)
ClearChildViewState()
已淘汰.

刪除所有伺服器控制項之子控制項的檢視狀態資訊。

(繼承來源 Control)
ClearEffectiveClientIDMode()
已淘汰.

將目前的控制項執行個體和任何子控制項的 ClientIDMode 屬性設定為 Inherit

(繼承來源 Control)
CreateChildControls()
已淘汰.

由 ASP.NET 網頁架構呼叫,通知使用組合實作的伺服器控制項來建立所包含的任何子控制項,以準備回傳或呈現。

(繼承來源 Control)
CreateControlCollection()
已淘汰.

建立新的 ControlCollection 物件來保存伺服器控制項的子控制項 (常值和伺服器)。

(繼承來源 Control)
CreateDefaultTemplatedUI(Boolean)
已淘汰.

由裝置配接器呼叫來建立此控制項的預設範本化使用者介面 (UI)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
CreateStyle()
已淘汰.

建構和傳回與控制項關聯的樣式物件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
CreateTemplatedUI(Boolean)
已淘汰.

由基底類別呼叫,用以建立樣板化 UI。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
DataBind()
已淘汰.

將資料來源繫結至所叫用的伺服器控制項及其所有子控制項。

(繼承來源 Control)
DataBind(Boolean)
已淘汰.

使用會引發 DataBinding 事件的選項,繫結資料來源至叫用的伺服器控制項及其所有子控制項。

(繼承來源 Control)
DataBindChildren()
已淘汰.

繫結資料來源至伺服器控制項的子控制項。

(繼承來源 Control)
Dispose()
已淘汰.

啟用伺服器控制項,在它從記憶體釋放之前執行最後清除。

(繼承來源 Control)
EndRenderTracing(TextWriter, Object)
已淘汰.

結束轉譯資料的設計階段追蹤。

(繼承來源 Control)
EnsureChildControls()
已淘汰.

判斷伺服器控制項是否包含子控制項。 如果不包含,則建立子控制項。

(繼承來源 Control)
EnsureID()
已淘汰.

為尚未指定識別項的控制項,建立識別項。

(繼承來源 Control)
EnsureTemplatedUI()
已淘汰.

使用這個方法確認樣板已具現化 (Instantiated),以允許用程式設計方式存取樣板的具現化內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FindControl(String)
已淘汰.

在目前命名容器搜尋具有指定 id 參數的伺服器控制項。

(繼承來源 Control)
FindControl(String, Int32)
已淘汰.

使用指定的 id 和有助於搜尋之 pathOffset 參數中所指定的整數,在目前的命名容器中搜尋伺服器控制項。 您不應該覆寫這個版本的 FindControl 方法。

(繼承來源 Control)
Focus()
已淘汰.

設定控制項的輸入焦點。

(繼承來源 Control)
GetAttribute(String)
已淘汰.

從控制項中擷取指定之屬性 (Attribute) 的屬性 (Property)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
GetDesignModeState()
已淘汰.

取得控制項的設計階段資料。

(繼承來源 Control)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetRouteUrl(Object)
已淘汰.

取得會對應於一組路由參數的 URL。

(繼承來源 Control)
GetRouteUrl(RouteValueDictionary)
已淘汰.

取得會對應於一組路由參數的 URL。

(繼承來源 Control)
GetRouteUrl(String, Object)
已淘汰.

取得 URL,此 URL 對應於一組路由參數及一個路由名稱。

(繼承來源 Control)
GetRouteUrl(String, RouteValueDictionary)
已淘汰.

取得 URL,此 URL 對應於一組路由參數及一個路由名稱。

(繼承來源 Control)
GetTemplate(String)
已淘汰.

傳回具有指定名稱的樣板。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
GetUniqueIDRelativeTo(Control)
已淘汰.

傳回指定之控制項 UniqueID 屬性的前置部分。

(繼承來源 Control)
HasControls()
已淘汰.

判斷伺服器控制項是否包含任何子控制項。

(繼承來源 Control)
HasEvents()
已淘汰.

傳回值,指出控制項或任何子控制項的事件是否已註冊。

(繼承來源 Control)
IsFormSubmitControl()
已淘汰.

如果控制項會送出表單,則傳回 true。 預設為 false。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
IsLiteralContent()
已淘汰.

判斷伺服器控制項是否只儲存常值內容。

(繼承來源 Control)
IsVisibleOnPage(Int32)
已淘汰.

傳回是否可以在表單的特定頁面上看見控制項。 用於表單編頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
LoadControlState(Object)
已淘汰.

SaveControlState() 方法所儲存的上一頁要求中,還原控制項狀態資訊。

(繼承來源 Control)
LoadPrivateViewState(Object)
已淘汰.

載入私用檢視狀態。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
LoadViewState(Object)
已淘汰.

SaveViewState() 方法所儲存的先前頁面要求來還原檢視狀態資訊。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

MapPathSecure(String)
已淘汰.

擷取虛擬絕對路徑或相對路徑所對應至的實體路徑。

(繼承來源 Control)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnBubbleEvent(Object, EventArgs)
已淘汰.

決定伺服器控制項的事件是否要在頁面的 UI 伺服器控制項階層架構中向上傳遞。

(繼承來源 Control)
OnDataBinding(EventArgs)
已淘汰.

引發 DataBinding 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnInit(EventArgs)
已淘汰.

引發 Init 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnLoad(EventArgs)
已淘汰.

引發 Unload 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnPageChange(Int32, Int32)
已淘汰.

編頁控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnPreRender(EventArgs)
已淘汰.

引發 PreRender 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnRender(HtmlTextWriter)
已淘汰.

呈現指定輸出資料流的控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

(繼承來源 MobileControl)
OnUnload(EventArgs)
已淘汰.

引發 Unload 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
OpenFile(String)
已淘汰.

取得用來讀取檔案的 Stream

(繼承來源 Control)
PaginateRecursive(ControlPager)
已淘汰.

將控制項和其子系編頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
RaiseBubbleEvent(Object, EventArgs)
已淘汰.

指派事件的任何來源和它的資訊至控制項的父控制項。

(繼承來源 Control)
Remove(String)
已淘汰.

從樣式表移除指定的樣式。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

RemovedControl(Control)
已淘汰.

Control 物件的 Controls 集合中移除子控制項之後呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
Render(HtmlTextWriter)
已淘汰.

將伺服器控制項內容傳送到提供的 HtmlTextWriter 物件,以寫入要在用戶端上呈現的內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
RenderChildren(HtmlTextWriter)
已淘汰.

使用提供的 HtmlTextWriter,輸出伺服器控制項之子控制項的內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
RenderControl(HtmlTextWriter)
已淘汰.

將伺服器控制項內容輸出至提供的 HtmlTextWriter 物件,並在啟用追蹤時儲存控制項的追蹤資訊。

(繼承來源 Control)
RenderControl(HtmlTextWriter, ControlAdapter)
已淘汰.

使用提供的 HtmlTextWriter 物件,輸出伺服器控制項內容至提供的 ControlAdapter 物件。

(繼承來源 Control)
ResolveAdapter()
已淘汰.

取得負責呈現指定之控制項的控制項配置器。

(繼承來源 Control)
ResolveClientUrl(String)
已淘汰.

取得瀏覽器可使用的 URL。

(繼承來源 Control)
ResolveFormReference(String)
已淘汰.

傳回名稱參數所參考的表單物件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
ResolveUrl(String)
已淘汰.

將 URL 轉換為要求用戶端可使用的 URL。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
SaveControlState()
已淘汰.

儲存頁面回傳至伺服器以來,所發生的任何伺服器控制項狀態變更。

(繼承來源 Control)
SavePrivateViewState()
已淘汰.

儲存從持續性中載入頁面以來所發生的任何私用檢視狀態變更。 如果沒有發生任何變更,則這個方法會傳回 null。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
SaveViewState()
已淘汰.

儲存自頁面回傳至伺服器以來所發生的任何伺服器控制項檢視狀態變更。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

SetAttribute(String, String)
已淘汰.

指定要指派給 MobileControl 物件的屬性及其值。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
SetDesignModeState(IDictionary)
已淘汰.

設定控制項的設計階段資料。

(繼承來源 Control)
SetRenderMethodDelegate(RenderMethod)
已淘汰.

指定事件處理常式委派,以呈現伺服器控制項及其內容至其父控制項。

(繼承來源 Control)
SetTraceData(Object, Object)
已淘汰.

使用追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。

(繼承來源 Control)
SetTraceData(Object, Object, Object)
已淘汰.

使用追蹤的物體、追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。

(繼承來源 Control)
ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)
TrackViewState()
已淘汰.

導致對伺服器控制項的檢視狀態變更的追蹤 (Tracking),以便它們能夠儲存於伺服器控制項的 StateBag 物件。 這個物件可透過 ViewState 屬性存取。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites

事件

DataBinding
已淘汰.

發生於伺服器控制項繫結至資料來源時。

(繼承來源 Control)
Disposed
已淘汰.

發生於伺服器控制項從記憶體釋放時,這是在要求 ASP.NET 網頁時,伺服器控制項生命週期的最後階段。

(繼承來源 Control)
Init
已淘汰.

發生於初始化伺服器控制項時,是其生命週期中的第一個步驟。

(繼承來源 Control)
Load
已淘汰.

發生於載入伺服器控制項至 Page 物件時。

(繼承來源 Control)
PreRender
已淘汰.

Control 物件載入之後但在呈現之前發生。

(繼承來源 Control)
Unload
已淘汰.

發生於伺服器控制項從記憶體卸載時。

(繼承來源 Control)

明確介面實作

IAttributeAccessor.GetAttribute(String)
已淘汰.

如需這個方法的說明,請參閱 GetAttribute(String)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
IAttributeAccessor.SetAttribute(String, String)
已淘汰.

如需這個成員的說明,請參閱 SetAttribute(String, String)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

(繼承來源 MobileControl)
IControlBuilderAccessor.ControlBuilder
已淘汰.

如需這個成員的說明,請參閱 ControlBuilder

(繼承來源 Control)
IControlDesignerAccessor.GetDesignModeState()
已淘汰.

如需這個成員的說明,請參閱 GetDesignModeState()

(繼承來源 Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary)
已淘汰.

如需這個成員的說明,請參閱 SetDesignModeState(IDictionary)

(繼承來源 Control)
IControlDesignerAccessor.SetOwnerControl(Control)
已淘汰.

如需這個成員的說明,請參閱 SetOwnerControl(Control)

(繼承來源 Control)
IControlDesignerAccessor.UserData
已淘汰.

如需這個成員的說明,請參閱 UserData

(繼承來源 Control)
IDataBindingsAccessor.DataBindings
已淘汰.

如需這個成員的說明,請參閱 DataBindings

(繼承來源 Control)
IDataBindingsAccessor.HasDataBindings
已淘汰.

如需這個成員的說明,請參閱 HasDataBindings

(繼承來源 Control)
IExpressionsAccessor.Expressions
已淘汰.

如需這個成員的說明,請參閱 Expressions

(繼承來源 Control)
IExpressionsAccessor.HasExpressions
已淘汰.

如需這個成員的說明,請參閱 HasExpressions

(繼承來源 Control)
IParserAccessor.AddParsedSubObject(Object)
已淘汰.

如需這個成員的說明,請參閱 AddParsedSubObject(Object)

(繼承來源 Control)

擴充方法

FindDataSourceControl(Control)
已淘汰.

傳回與指定之控制項的資料控制項相關聯的資料來源。

FindFieldTemplate(Control, String)
已淘汰.

傳回在指定之控制項的命名容器中所指定資料行的欄位樣板。

FindMetaTable(Control)
已淘汰.

傳回包含資料控制項的中繼資料表物件。

適用於

另請參閱