Form 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。
public ref class Form : System::Web::UI::MobileControls::Panel, System::Web::UI::IPostBackEventHandler
[System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.MobileControls.Adapters.HtmlFormAdapter))]
public class Form : System.Web.UI.MobileControls.Panel, System.Web.UI.IPostBackEventHandler
[System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.MobileControls.Adapters.HtmlFormAdapter))]
[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 Form : System.Web.UI.MobileControls.Panel, System.Web.UI.IPostBackEventHandler
[<System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.MobileControls.Adapters.HtmlFormAdapter))>]
type Form = class
inherit Panel
interface ITemplateable
interface IPostBackEventHandler
[<System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.MobileControls.Adapters.HtmlFormAdapter))>]
[<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 Form = class
inherit Panel
interface ITemplateable
interface IPostBackEventHandler
Public Class Form
Inherits Panel
Implements IPostBackEventHandler
- 繼承
- 屬性
- 實作
下列程式代碼範例示範如何建立具有兩個窗體的頁面,以及兩個窗體之間的連結。 一個表單有複選框清單。 選取專案且按兩下 [ 提交 ] 按鈕時,窗體會顯示所選項目的清單及其值。 請注意, Activate 事件方法會準備要顯示的個別窗體
備註
下列程式代碼範例會使用單一檔案程式代碼模型,如果直接複製到程式代碼後置檔案,可能無法正常運作。 此程式代碼範例必須複製到擴展名為 .aspx 的空白文本檔。 如需詳細資訊,請參閱 ASP.NET Web Forms 頁面語法概觀。
<%@ 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.Mobile" %>
<%@ Import Namespace="System.Web.UI.MobileControls" %>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
// When Form1 is activated
private void Form1_Activate(object sender, EventArgs e)
{
string viewText = "You have viewed this Form {0} times.";
if (count == 0) // First viewing
message2.Text = "Welcome to the Form Sample";
else // subsequent viewings
message2.Text = String.Format(viewText,
(count + 1).ToString());
// Format the form
Form1.Alignment = Alignment.Center;
Form1.Wrapping = Wrapping.NoWrap;
Form1.BackColor = Color.LightBlue;
Form1.ForeColor = Color.Blue;
Form1.Paginate = true;
// Create an array and add the tasks to it.
ArrayList arr = new ArrayList();
arr.Add(new Task("Verify transactions", "Done"));
arr.Add(new Task("Check balance sheet", "Scheduled"));
arr.Add(new Task("Send report", "Pending"));
// Bind the SelectionList to the array.
SelectionList1.DataValueField = "Status";
SelectionList1.DataTextField = "TaskName";
SelectionList1.DataSource = arr;
SelectionList1.DataBind();
}
// <Snippet2>
// When Form1 is deactivated
private void Form1_Deactivate(object sender, EventArgs e)
{
count++;
}
// </Snippet2>
// <Snippet3>
// When Form2 is activated
private void Form2_Activate(object sender, EventArgs e)
{
Form2.BackColor = Color.DarkGray;
Form2.ForeColor = Color.White;
Form2.Font.Bold = BooleanOption.True;
}
// </Snippet3>
// The Submit button is clicked
protected void Command1_OnSubmit(object sender, EventArgs e)
{
message2.Text = "FORM RESULTS:";
message2.Font.Bold = BooleanOption.True;
// Display a list of selected items with values
for (int i = 0; i < SelectionList1.Items.Count; i++)
{
// Create a string and a TextView control
TextView txtView = new TextView();
string txt = "";
string spec = "{0} is {1}<br />";
// Display a list of selected items with values
// Get the list item
MobileListItem itm = SelectionList1.Items[i];
// List the selected items and values
if (itm.Selected)
{
txt += String.Format(spec, itm.Text, itm.Value);
}
// Put the text into the TextView
txtView.Text = txt;
// Add txtView to the form
Form1.Controls.Add(txtView);
}
// Hide unnecessary controls
SelectionList1.Visible = false;
link1.Visible = false;
Command1.Visible = false;
}
// Property to persist the count between postbacks
private int count
{
get
{
object o = ViewState["FormCount"];
return o == null ? 0 : (int)o;
}
set { ViewState["FormCount"] = value; }
}
// A custom class for the task array
private class Task
{
private String _TaskName;
private String _Status;
public Task(String TaskName, String Status)
{
_TaskName = TaskName;
_Status = Status;
}
public String TaskName
{
get { return _TaskName; }
}
public String Status
{
get { return _Status; }
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<!-- The first form: Form1 -->
<mobile:Form ID="Form1" Runat="server"
OnDeactivate="Form1_Deactivate"
OnActivate="Form1_Activate">
<mobile:Label ID="message1" Runat="server">
Welcome to ASP.NET
</mobile:Label>
<mobile:Label ID="message2" Runat="server" />
<mobile:SelectionList Runat="server"
ID="SelectionList1"
ForeColor="red" SelectType="CheckBox" />
<mobile:Link ID="link1" Runat="server"
NavigateUrl="#Form2"
Text="Next Form" /><br />
<mobile:Command ID="Command1" Runat="server"
Text="Submit" OnClick="Command1_OnSubmit" />
</mobile:Form>
<!-- The second form: Form2 -->
<mobile:Form ID="Form2" Runat="server"
OnActivate="Form2_Activate">
<mobile:Label ID="message4" Runat="server">
Welcome to ASP.NET
</mobile:Label>
<mobile:Link ID="Link2" Runat="server"
NavigateUrl="#Form1" Text="Back" />
</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.Mobile" %>
<%@ Import Namespace="System.Web.UI.MobileControls" %>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
' When Form1 is activated
Private Sub Form1_Activate(ByVal sender As Object, _
ByVal e As EventArgs)
Dim viewText As String = "You have viewed this Form {0} times."
' First viewing
If (count = 0) Then
message2.Text = "Welcome to the Form Sample"
Else ' subsequent viewings
message2.Text = String.Format(viewText, _
(count + 1).ToString())
End If
' Format the form
Form1.Alignment = Alignment.Center
Form1.Wrapping = Wrapping.NoWrap
Form1.BackColor = Color.LightBlue
Form1.ForeColor = Color.Blue
Form1.Paginate = True
' Create an array and add the tasks to it.
Dim arr As ArrayList = New ArrayList()
arr.Add(New Task("Verify transactions", "Done"))
arr.Add(New Task("Check balance sheet", "Scheduled"))
arr.Add(New Task("Send report", "Pending"))
' Bind the SelectionList to the array.
SelectionList1.DataValueField = "Status"
SelectionList1.DataTextField = "TaskName"
SelectionList1.DataSource = arr
SelectionList1.DataBind()
End Sub
' <Snippet2>
' When Form1 is deactivated
Private Sub Form1_Deactivate(ByVal sender As Object, _
ByVal e As EventArgs)
count += 1
End Sub
' </Snippet2>
' <Snippet3>
' When Form2 is activated
Private Sub Form2_Activate(ByVal sender As Object, _
ByVal e As EventArgs)
Form2.BackColor = Color.DarkGray
Form2.ForeColor = Color.White
Form2.Font.Bold = BooleanOption.True
End Sub
' </Snippet3>
' The Submit button is clicked
Protected Sub Command1_OnSubmit(ByVal sender As Object, _
ByVal e As EventArgs)
Dim i As Integer
message2.Text = "FORM RESULTS:"
message2.Font.Bold = BooleanOption.True
' Create a string and a TextView control
Dim txtView As TextView = New TextView()
Dim txt As String = ""
Dim spec As String = "{0} is {1}<br />"
' Display a list of selected items with values
For i = 0 To SelectionList1.Items.Count - 1
' Get the ListItem
Dim itm As MobileListItem = SelectionList1.Items(i)
' List the selected items and values
If itm.Selected Then
txt &= String.Format(spec, itm.Text, itm.Value)
End If
Next
' Put the text into the TextView
txtView.Text = txt
' Add the TextView to the form
Form1.Controls.Add(txtView)
' Hide unnecessary controls
SelectionList1.Visible = False
link1.Visible = False
Command1.Visible = False
End Sub
' Property to persist the count between postbacks
Private Property count() As Integer
Get
Dim o As Object = ViewState("FormCount")
If IsNothing(o) Then
Return 0
Else
Return CType(o, Integer)
End If
End Get
Set(ByVal value As Integer)
ViewState("FormCount") = value
End Set
End Property
' A custom class for the task array
Private Class Task
Private _TaskName As String
Private _Status As String
Public Sub New(ByVal TaskName As String, ByVal Status As String)
_TaskName = TaskName
_Status = Status
End Sub
Public ReadOnly Property TaskName() As String
Get
Return _TaskName
End Get
End Property
Public ReadOnly Property Status() As String
Get
Return _Status
End Get
End Property
End Class
</script>
<html xmlns="http:'www.w3.org/1999/xhtml" >
<body>
<!-- The first form: Form1 -->
<mobile:Form ID="Form1" Runat="server"
OnDeactivate="Form1_Deactivate"
OnActivate="Form1_Activate">
<mobile:Label ID="message1" Runat="server">
Welcome to ASP.NET
</mobile:Label>
<mobile:Label ID="message2" Runat="server" />
<mobile:SelectionList Runat="server"
ID="SelectionList1"
ForeColor="red" SelectType="CheckBox" />
<mobile:Link ID="link1" Runat="server"
NavigateUrl="#Form2"
Text="Next Form" /><br />
<mobile:Command ID="Command1" Runat="server"
Text="Submit" OnClick="Command1_OnSubmit" />
</mobile:Form>
<!-- The second form: Form2 -->
<mobile:Form ID="Form2" Runat="server"
OnActivate="Form2_Activate">
<mobile:Label ID="message4" Runat="server">
Welcome to ASP.NET
</mobile:Label>
<mobile:Link ID="Link2" Runat="server"
NavigateUrl="#Form1" Text="Back" />
</mobile:Form>
</body>
</html>
表單代表 ASP.NET 行動網頁中控件的最外層群組。 個別的行動網頁可以包含最外層的多個窗體。 表單不可巢狀;如果您想要巢狀容器,請使用 Panel 控件。 如需詳細資訊,請參閱 表單控件簡介。 若要顯示特定表單,請將目前頁面上的屬性設定 ActiveForm 為所需的表單,或將 NavigateUrl 控件中的 Link 屬性設定為所需的表單。 您可以在控制的文字內容包含常值文字及其隨附的 Form 標記標記。 使用範本時,請務必記住控件 Form 會在表單的方法中 OnInit 建立範本的實例。 表單OnInit的 方法會在 和 Page_Init
之前Page_Load
呼叫。 此外,頁面建構函式也太早執行,無法在 方法中 OnInit 設定範本,因為尚未建立表單。 若要修正此問題,請攔截窗體自己的 OnInit 方法,並在該處建立範本的實例。 如需詳細資訊,請參閱 實作樣板化轉譯。
Form() |
已淘汰.
初始化 Form 類別的新執行個體。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Action |
已淘汰.
取得或設定表單所送到的 URL。 預設值為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Adapter |
已淘汰.
針對控制項傳回裝置的特定配置器。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Alignment |
已淘汰.
取得或設定樣式的指定對齊方式。 預設值是 NotSet。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
App |
已淘汰.
取得或設定包含了此控制項之 Page 或 UserControl 物件的相對應用程式虛擬目錄。 (繼承來源 Control) |
Back |
已淘汰.
取得或設定樣式的指定背景色彩。 預設值是 Empty。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Binding |
已淘汰.
取得包含了此控制項之資料繫結的控制項。 (繼承來源 Control) |
Break |
已淘汰.
取得或設定屬性,這個屬性決定控制項之後是否呈現其他尾端分行符號。 這個分行符號會使後續內容從下一行開始。 預設為 |
Child |
已淘汰.
取得值,指出是否已經建立伺服器控制項的子控制項。 (繼承來源 Control) |
ClientID |
已淘汰.
取得 ASP.NET 所產生之 HTML 標記的控制項識別碼。 (繼承來源 Control) |
Client |
已淘汰.
取得或設定用來產生 ClientID 屬性值的演算法。 (繼承來源 Control) |
Client |
已淘汰.
取得字元值,表示在 ClientID 屬性中所使用的分隔字元。 (繼承來源 Control) |
Content |
已淘汰.
傳回包含裝置特定內容的面板。 內容樣板必須針對目標裝置加以定義和選擇。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 Panel) |
Context |
已淘汰.
取得與目前 Web 要求的伺服器控制項關聯的 HttpContext 物件。 (繼承來源 Control) |
Controls |
已淘汰.
取得 ControlCollection 物件,表示 UI 階層架構中指定之伺服器控制項的子控制項。 (繼承來源 Control) |
Control |
已淘汰.
取得或設定表單上可分頁的控制項。 預設值為 |
Current |
已淘汰.
取得或設定作用中表單中目前頁面的索引。 預設值是 |
Custom |
已淘汰.
傳回一組針對控制項定義的自訂屬性 (Attribute)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Data |
已淘汰.
如果命名容器實作 IDataItemContainer,則取得命名容器的參考。 (繼承來源 Control) |
Data |
已淘汰.
如果命名容器實作 IDataKeysControl,則取得命名容器的參考。 (繼承來源 Control) |
Design |
已淘汰.
取得值,指出控制項是否正用於設計介面上。 (繼承來源 Control) |
Device |
已淘汰.
取得或設定與控制項關聯的 DeviceSpecific/Choice 建構。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Enable |
已淘汰.
取得值,指出主題是否套用至此控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Enable |
已淘汰.
取得或設定值,該值表示伺服器控制項是否對要求的用戶端而言保持其檢視狀態,以及它包含的任何子控制項狀態。 (繼承來源 Control) |
Events |
已淘汰.
取得控制項事件處理常式委派 (Delegate) 的清單。 這個屬性是唯讀的。 (繼承來源 Control) |
First |
已淘汰.
傳回會出現這個控制項之表單的第一頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Font |
已淘汰.
取得 FontInfo 物件,這個物件包含控制項的字型資訊。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Footer |
已淘汰.
傳回面板,表示表單的頁尾。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Fore |
已淘汰.
取得或設定樣式的指定前景色彩。 通常這個屬性會設定文字的色彩。 預設值是 Empty。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Form |
已淘汰.
可用來存取包含表單。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Has |
已淘汰.
取得值,指出目前伺服器控制項的子控制項是否有任何已儲存的檢視狀態設定。 (繼承來源 Control) |
Header |
已淘汰.
傳回面板,表示表單的頁首。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
ID |
已淘汰.
取得或設定指派給伺服器控制項的程式設計識別項。 (繼承來源 Control) |
Id |
已淘汰.
取得用來分隔控制項識別項的字元。 (繼承來源 Control) |
Inner |
已淘汰.
傳回控制項內的文字。 內部文字可能是來自子控制項的文字組合。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Is |
已淘汰.
取得值,指出這個控制項中所包含的控制項是否有控制項狀態。 (繼承來源 Control) |
Is |
已淘汰.
取得值,指出 MobileControl 物件是否有現用的樣板集。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Is |
已淘汰.
取得值,指出伺服器控制項是否正在儲存檢視狀態的變更。 (繼承來源 Control) |
Is |
已淘汰.
取得值,指出這個控制項是否已啟用檢視狀態。 (繼承來源 Control) |
Last |
已淘汰.
傳回顯示所指定控制項之表單的最後一頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Load |
已淘汰.
取得值,指出控制項是否依 ID (而不是索引) 參與載入其檢視狀態。 (繼承來源 Control) |
Method |
已淘汰.
取得或設定用來送出表單的方法。 預設值是 |
Mobile |
已淘汰.
傳回所包含的頁面。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Naming |
已淘汰.
取得伺服器控制項命名容器的參考,其建立唯一命名空間,在具有相同 ID 屬性值的伺服器控制項之間作區別。 (繼承來源 Control) |
Page |
已淘汰.
取得含有伺服器控制項的 Page 執行個體的參考。 (繼承來源 Control) |
Page |
已淘汰.
在表單分頁後,傳回表單中的頁數。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Pager |
已淘汰.
取得或設定用來呈現表單之分頁 UI 的樣式。 預設值為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Paginate |
已淘汰.
取得或設定布林值 (Boolean),指出是否要重新編頁 Panel 控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 Panel) |
Paginate |
已淘汰.
傳回是否必須對控制項的子系進行分頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Parent |
已淘汰.
在網頁控制階層架構中取得伺服器控制項之父控制項的參考。 (繼承來源 Control) |
Rendering |
已淘汰.
取得值,這個值會指定將與呈現 HTML 相容的 ASP.NET 版本。 (繼承來源 Control) |
Script |
已淘汰.
若已定義指令碼樣板,且已對目標裝置選擇該樣板,則會針對表單,傳回內含任何裝置專屬指令碼的面板。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
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) |
Style |
已淘汰.
取得或設定控制項的樣式屬性參考。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Template |
已淘汰.
取得或設定包含了此控制項之樣板的參考。 (繼承來源 Control) |
Template |
已淘汰.
取得包含目前伺服器控制項的 Page 或 UserControl 的虛擬目錄。 (繼承來源 Control) |
Title |
已淘汰.
取得或設定指定之表單的標題。 預設值是空的 |
UniqueID |
已淘汰.
取得伺服器控制項唯一的、符合階層架構的識別項。 (繼承來源 Control) |
Validate |
已淘汰.
取得或設定值,指出控制項是否對來自瀏覽器的用戶端輸入檢查潛在的危險值。 (繼承來源 Control) |
View |
已淘汰.
取得狀態資訊的字典,允許您在相同網頁的多個要求之間,儲存和還原伺服器控制項的檢視狀態。 (繼承來源 Control) |
View |
已淘汰.
取得值,指出 StateBag 物件是否不區分大小寫。 (繼承來源 Control) |
View |
已淘汰.
取得或設定這個控制項的檢視狀態模式。 (繼承來源 Control) |
Visible |
已淘汰.
取得或設定值,指出伺服器控制項是否會轉譯為頁面上的 UI。 (繼承來源 Control) |
Visible |
已淘汰.
以字元方式取得控制項的近似權重。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Wrapping |
已淘汰.
取得或設定樣式的指定換行模式。 預設值是 NotSet。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Added |
已淘汰.
在子控制項加入 Control 物件的 Controls 集合後呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Add |
已淘汰.
在提供的清單中加入一組表單,其中包含指定控制項的連結。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 Panel) |
Add |
已淘汰.
通知伺服器控制項,XML 或 HTML 項目已剖析,並將項目加入伺服器控制項的 ControlCollection 物件中。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Apply |
已淘汰.
將頁面樣式表中所定義的樣式屬性套用至控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Begin |
已淘汰.
開始進行轉譯資料的設計階段追蹤。 (繼承來源 Control) |
Build |
已淘汰.
收集伺服器控制項的相關資訊,並在頁面啟用追蹤時將此資訊傳遞至 Trace 屬性以顯示之。 (繼承來源 Control) |
Clear |
已淘汰.
將快取的 ClientID 值設定為 |
Clear |
已淘汰.
刪除伺服器控制項之子控制項的控制項狀態資訊。 (繼承來源 Control) |
Clear |
已淘汰.
刪除所有伺服器控制項之子控制項的檢視狀態和控制項狀態資訊。 (繼承來源 Control) |
Clear |
已淘汰.
刪除所有伺服器控制項之子控制項的檢視狀態資訊。 (繼承來源 Control) |
Clear |
已淘汰.
將目前的控制項執行個體和任何子控制項的 ClientIDMode 屬性設定為 Inherit。 (繼承來源 Control) |
Create |
已淘汰.
由 ASP.NET 網頁架構呼叫,通知使用組合實作的伺服器控制項來建立所包含的任何子控制項,以準備回傳或呈現。 (繼承來源 Control) |
Create |
已淘汰.
建立新的 ControlCollection 物件來保存伺服器控制項的子控制項 (常值和伺服器)。 (繼承來源 Control) |
Create |
已淘汰.
由裝置配接器呼叫來建立此控制項的預設範本化使用者介面 (UI)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Create |
已淘汰.
建構和傳回與控制項關聯的樣式物件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Create |
已淘汰.
由基底類別呼叫,用以建立樣板化 UI。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Data |
已淘汰.
將資料來源繫結至所叫用的伺服器控制項及其所有子控制項。 (繼承來源 Control) |
Data |
已淘汰.
使用會引發 DataBinding 事件的選項,繫結資料來源至叫用的伺服器控制項及其所有子控制項。 (繼承來源 Control) |
Data |
已淘汰.
繫結資料來源至伺服器控制項的子控制項。 (繼承來源 Control) |
Dispose() |
已淘汰.
啟用伺服器控制項,在它從記憶體釋放之前執行最後清除。 (繼承來源 Control) |
End |
已淘汰.
結束轉譯資料的設計階段追蹤。 (繼承來源 Control) |
Ensure |
已淘汰.
判斷伺服器控制項是否包含子控制項。 如果不包含,則建立子控制項。 (繼承來源 Control) |
EnsureID() |
已淘汰.
為尚未指定識別項的控制項,建立識別項。 (繼承來源 Control) |
Ensure |
已淘汰.
使用這個方法確認樣板已具現化 (Instantiated),以允許用程式設計方式存取樣板的具現化內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Equals(Object) |
已淘汰.
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
Find |
已淘汰.
在目前命名容器搜尋具有指定 |
Find |
已淘汰.
使用指定的 |
Focus() |
已淘汰.
設定控制項的輸入焦點。 (繼承來源 Control) |
Get |
已淘汰.
從控制項中擷取指定之屬性 (Attribute) 的屬性 (Property)。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Get |
已淘汰.
取得控制項的設計階段資料。 (繼承來源 Control) |
Get |
已淘汰.
做為預設雜湊函式。 (繼承來源 Object) |
Get |
已淘汰.
傳回連結至目前表單的一組表單。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Get |
已淘汰.
取得會對應於一組路由參數的 URL。 (繼承來源 Control) |
Get |
已淘汰.
取得會對應於一組路由參數的 URL。 (繼承來源 Control) |
Get |
已淘汰.
取得 URL,此 URL 對應於一組路由參數及一個路由名稱。 (繼承來源 Control) |
Get |
已淘汰.
取得 URL,此 URL 對應於一組路由參數及一個路由名稱。 (繼承來源 Control) |
Get |
已淘汰.
傳回具有指定名稱的樣板。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Get |
已淘汰.
取得目前執行個體的 Type。 (繼承來源 Object) |
Get |
已淘汰.
傳回指定之控制項 UniqueID 屬性的前置部分。 (繼承來源 Control) |
Has |
已淘汰.
若表單有 Activate 事件的處理常式,則傳回 |
Has |
已淘汰.
判斷伺服器控制項是否包含任何子控制項。 (繼承來源 Control) |
Has |
已淘汰.
若存在 Deactivate 事件,則傳回 |
Has |
已淘汰.
傳回值,指出控制項或任何子控制項的事件是否已註冊。 (繼承來源 Control) |
Is |
已淘汰.
如果控制項會送出表單,則傳回 |
Is |
已淘汰.
判斷伺服器控制項是否只儲存常值內容。 (繼承來源 Control) |
Is |
已淘汰.
傳回是否可以在表單的特定頁面上看見控制項。 用於表單編頁。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Load |
已淘汰.
從 SaveControlState() 方法所儲存的上一頁要求中,還原控制項狀態資訊。 (繼承來源 Control) |
Load |
已淘汰.
從私用 (Private) 來源載入檢視狀態。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Load |
已淘汰.
從 SaveViewState() 方法所儲存的先前頁面要求來還原檢視狀態資訊。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Map |
已淘汰.
擷取虛擬絕對路徑或相對路徑所對應至的實體路徑。 (繼承來源 Control) |
Memberwise |
已淘汰.
建立目前 Object 的淺層複製。 (繼承來源 Object) |
On |
已淘汰.
啟動表單時呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
決定伺服器控制項的事件是否要在頁面的 UI 伺服器控制項階層架構中向上傳遞。 (繼承來源 Control) |
On |
已淘汰.
引發 DataBinding 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
啟動表單時呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
引發 Init 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
引發 Unload 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
On |
已淘汰.
編頁控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
On |
已淘汰.
表單已分頁時會發生。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
引發 PreRender 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
On |
已淘汰.
呈現指定輸出資料流的控制項。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
On |
已淘汰.
引發 Unload 事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Open |
已淘汰.
取得用來讀取檔案的 Stream。 (繼承來源 Control) |
Paginate |
已淘汰.
將控制項和其子系編頁。 由 ASP.NET 內部呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Raise |
已淘汰.
指派事件的任何來源和它的資訊至控制項的父控制項。 (繼承來源 Control) |
Raise |
已淘汰.
通知 Form 物件有回傳事件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Removed |
已淘汰.
從 Control 物件的 Controls 集合中移除子控制項之後呼叫。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Render(Html |
已淘汰.
將伺服器控制項內容傳送到提供的 HtmlTextWriter 物件,以寫入要在用戶端上呈現的內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Render |
已淘汰.
使用提供的 HtmlTextWriter,輸出伺服器控制項之子控制項的內容。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Render |
已淘汰.
將伺服器控制項內容輸出至提供的 HtmlTextWriter 物件,並在啟用追蹤時儲存控制項的追蹤資訊。 (繼承來源 Control) |
Render |
已淘汰.
使用提供的 HtmlTextWriter 物件,輸出伺服器控制項內容至提供的 ControlAdapter 物件。 (繼承來源 Control) |
Resolve |
已淘汰.
取得負責呈現指定之控制項的控制項配置器。 (繼承來源 Control) |
Resolve |
已淘汰.
取得瀏覽器可使用的 URL。 (繼承來源 Control) |
Resolve |
已淘汰.
傳回名稱參數所參考的表單物件。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Resolve |
已淘汰.
將 URL 轉換為要求用戶端可使用的 URL。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Save |
已淘汰.
儲存頁面回傳至伺服器以來,所發生的任何伺服器控制項狀態變更。 (繼承來源 Control) |
Save |
已淘汰.
儲存從持續性中載入頁面以來所發生的任何私用檢視狀態變更。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Save |
已淘汰.
儲存自頁面回傳至伺服器以來所發生的任何伺服器控制項檢視狀態變更。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Set |
已淘汰.
指定要指派給 MobileControl 物件的屬性及其值。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Set |
已淘汰.
設定控制項的設計階段資料。 (繼承來源 Control) |
Set |
已淘汰.
指定事件處理常式委派,以呈現伺服器控制項及其內容至其父控制項。 (繼承來源 Control) |
Set |
已淘汰.
使用追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。 (繼承來源 Control) |
Set |
已淘汰.
使用追蹤的物體、追蹤資料機碼和追蹤資料值,設定設計階段期間追蹤呈現資料的追蹤資料。 (繼承來源 Control) |
To |
已淘汰.
傳回代表目前物件的字串。 (繼承來源 Object) |
Track |
已淘汰.
導致對伺服器控制項之檢視狀態變更的追蹤 (Tracking),以便它們能夠儲存在伺服器控制項的 ViewState 屬性中。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 (繼承來源 MobileControl) |
Activate |
已淘汰.
表單變成現用時會發生。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Data |
已淘汰.
發生於伺服器控制項繫結至資料來源時。 (繼承來源 Control) |
Deactivate |
已淘汰.
現用表單變成非現用時會發生。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Disposed |
已淘汰.
發生於伺服器控制項從記憶體釋放時,這是在要求 ASP.NET 網頁時,伺服器控制項生命週期的最後階段。 (繼承來源 Control) |
Init |
已淘汰.
發生於初始化伺服器控制項時,是其生命週期中的第一個步驟。 (繼承來源 Control) |
Load |
已淘汰.
發生於載入伺服器控制項至 Page 物件時。 (繼承來源 Control) |
Paginated |
已淘汰.
表單已分頁時會發生。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET。 |
Pre |
已淘汰.
在 Control 物件載入之後但在呈現之前發生。 (繼承來源 Control) |
Unload |
已淘汰.
發生於伺服器控制項從記憶體卸載時。 (繼承來源 Control) |
Find |
已淘汰.
傳回與指定之控制項的資料控制項相關聯的資料來源。 |
Find |
已淘汰.
傳回在指定之控制項的命名容器中所指定資料行的欄位樣板。 |
Find |
已淘汰.
傳回包含資料控制項的中繼資料表物件。 |
產品 | 版本 (已過時) |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5 (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1) |