Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
229 lines (211 sloc) 19.6 KB
<Type Name="ListCommandEventArgs" FullName="System.Web.UI.MobileControls.ListCommandEventArgs">
<TypeSignature Language="C#" Value="public class ListCommandEventArgs : System.Web.UI.WebControls.CommandEventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ListCommandEventArgs extends System.Web.UI.WebControls.CommandEventArgs" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.MobileControls.ListCommandEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class ListCommandEventArgs&#xA;Inherits CommandEventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class ListCommandEventArgs : System::Web::UI::WebControls::CommandEventArgs" />
<TypeSignature Language="F#" Value="type ListCommandEventArgs = class&#xA; inherit CommandEventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.WebControls.CommandEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>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.")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides data for the <see cref="E:System.Web.UI.MobileControls.List.ItemCommand" /> event of a <see cref="T:System.Web.UI.MobileControls.List" /> control. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example shows how you can use the <xref:System.Web.UI.MobileControls.ListCommandEventArgs> object to modify the status of tasks in a list when the item is clicked. This example is part of a larger example for the <xref:System.Web.UI.MobileControls.List> overview.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-csharp[MobileListSample#2](~/samples/snippets/csharp/VS_Snippets_WebNet/MobileListSample/cs/Default.aspx#2)]
[!code-vb[MobileListSample#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/MobileListSample/vb/Default.aspx#2)]
]]></format>
</remarks>
<permission cref="T:System.Web.AspNetHostingPermission">for operating in a hosted environment. Demand value: <see cref="F:System.Security.Permissions.SecurityAction.InheritanceDemand" />; Permission value: <see cref="F:System.Web.AspNetHostingPermissionLevel.Minimal" />.</permission>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.MobileControls.ListCommandEventArgs" /> class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ListCommandEventArgs (System.Web.UI.MobileControls.MobileListItem item, object commandSource);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.MobileControls.MobileListItem item, object commandSource) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.ListCommandEventArgs.#ctor(System.Web.UI.MobileControls.MobileListItem,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (item As MobileListItem, commandSource As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ListCommandEventArgs(System::Web::UI::MobileControls::MobileListItem ^ item, System::Object ^ commandSource);" />
<MemberSignature Language="F#" Value="new System.Web.UI.MobileControls.ListCommandEventArgs : System.Web.UI.MobileControls.MobileListItem * obj -&gt; System.Web.UI.MobileControls.ListCommandEventArgs" Usage="new System.Web.UI.MobileControls.ListCommandEventArgs (item, commandSource)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="item" Type="System.Web.UI.MobileControls.MobileListItem" />
<Parameter Name="commandSource" Type="System.Object" />
</Parameters>
<Docs>
<param name="item">Initializes the <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" /> property.</param>
<param name="commandSource">Initializes the <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" /> property.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.MobileControls.ListCommandEventArgs" /> class using the provided <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" /> and <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" />. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `item` and `commandSource` parameters initialize the <xref:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem%2A> and <xref:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource%2A> properties with their respective values.
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ListCommandEventArgs (System.Web.UI.MobileControls.MobileListItem item, object commandSource, System.Web.UI.WebControls.CommandEventArgs originalArgs);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.MobileControls.MobileListItem item, object commandSource, class System.Web.UI.WebControls.CommandEventArgs originalArgs) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.ListCommandEventArgs.#ctor(System.Web.UI.MobileControls.MobileListItem,System.Object,System.Web.UI.WebControls.CommandEventArgs)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (item As MobileListItem, commandSource As Object, originalArgs As CommandEventArgs)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ListCommandEventArgs(System::Web::UI::MobileControls::MobileListItem ^ item, System::Object ^ commandSource, System::Web::UI::WebControls::CommandEventArgs ^ originalArgs);" />
<MemberSignature Language="F#" Value="new System.Web.UI.MobileControls.ListCommandEventArgs : System.Web.UI.MobileControls.MobileListItem * obj * System.Web.UI.WebControls.CommandEventArgs -&gt; System.Web.UI.MobileControls.ListCommandEventArgs" Usage="new System.Web.UI.MobileControls.ListCommandEventArgs (item, commandSource, originalArgs)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="item" Type="System.Web.UI.MobileControls.MobileListItem" />
<Parameter Name="commandSource" Type="System.Object" />
<Parameter Name="originalArgs" Type="System.Web.UI.WebControls.CommandEventArgs" />
</Parameters>
<Docs>
<param name="item">Initializes the <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" /> property.</param>
<param name="commandSource">Initializes the <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" /> property.</param>
<param name="originalArgs">The original arguments inherited from the <see cref="T:System.Web.UI.WebControls.CommandEventArgs" /> object.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.MobileControls.ListCommandEventArgs" /> class using the given <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" />, <see cref="P:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" />, and the original command arguments. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor builds a <xref:System.Web.UI.MobileControls.ListCommandEventArgs> object.
The `item` and `commandSource` parameters initialize the <xref:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem%2A> and <xref:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource%2A> properties with their respective values. This constructor includes an `originalArgs` parameter; this form of the constructor allows you to pass in a set of command arguments through the `originalArgs` parameter, which is useful for handling bubbled events.
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</Member>
<Member MemberName="CommandSource">
<MemberSignature Language="C#" Value="public object CommandSource { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object CommandSource" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CommandSource As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ CommandSource { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CommandSource : obj" Usage="System.Web.UI.MobileControls.ListCommandEventArgs.CommandSource" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns the control that raised the event. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<value>The control that raised the event.</value>
<remarks>To be added.</remarks>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</Member>
<Member MemberName="DefaultCommand">
<MemberSignature Language="C#" Value="protected static readonly string DefaultCommand;" />
<MemberSignature Language="ILAsm" Value=".field family static initonly string DefaultCommand" />
<MemberSignature Language="DocId" Value="F:System.Web.UI.MobileControls.ListCommandEventArgs.DefaultCommand" />
<MemberSignature Language="VB.NET" Value="Protected Shared ReadOnly DefaultCommand As String " />
<MemberSignature Language="C++ CLI" Value="protected: static initonly System::String ^ DefaultCommand;" />
<MemberSignature Language="F#" Value=" staticval mutable DefaultCommand : string" Usage="System.Web.UI.MobileControls.ListCommandEventArgs.DefaultCommand" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Sets or returns the name of the default command. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When set, the <xref:System.Web.UI.MobileControls.ObjectList> attempts to render a shortcut to invoke the default command. In HTML, the default rendering in `ListView` displays the first field as a link to the `DetailsView` of the <xref:System.Web.UI.MobileControls.ObjectList>. By setting the <xref:System.Web.UI.MobileControls.ObjectList.DefaultCommand%2A> property, clicking the link invokes the default command. Invoking the default command raises the <xref:System.Web.UI.MobileControls.Command.ItemCommand> event. The <xref:System.Web.UI.MobileControls.Command.CommandName%2A> of the <xref:System.Web.UI.MobileControls.ObjectListCommandEventArgs> object is set to the value of the <xref:System.Web.UI.MobileControls.ListCommandEventArgs.DefaultCommand> property.
Even if a default command is defined, you should include a command with the same name in the commands collection. If the control cannot render a graphical element that includes a shortcut for the default command, the default command is still available by rendering the <xref:System.Web.UI.MobileControls.ObjectList.Commands%2A?displayProperty=nameWithType> collection.
## Examples
The following code example demonstrates how to the use the <xref:System.Web.UI.MobileControls.ObjectList.DefaultCommand%2A> property to specify "Check" as the default command.
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see [ASP.NET Web Forms Page Code Model](https://msdn.microsoft.com/library/81b13e7a-b95b-4285-906f-d2dd77411417).
[!code-aspx-csharp[MobileCmdEventArgsSample#1](~/samples/snippets/csharp/VS_Snippets_WebNet/MobileCmdEventArgsSample/cs/Default.aspx#1)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</Member>
<Member MemberName="ListItem">
<MemberSignature Language="C#" Value="public System.Web.UI.MobileControls.MobileListItem ListItem { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.MobileControls.MobileListItem ListItem" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ListItem As MobileListItem" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::MobileControls::MobileListItem ^ ListItem { System::Web::UI::MobileControls::MobileListItem ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ListItem : System.Web.UI.MobileControls.MobileListItem" Usage="System.Web.UI.MobileControls.ListCommandEventArgs.ListItem" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.MobileControls.MobileListItem</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns the list item that generated the event. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://docs.microsoft.com/aspnet/mobile/overview">Mobile Apps &amp; Sites with ASP.NET</see>.</summary>
<value>The list item that generated the event.</value>
<remarks>To be added.</remarks>
<altmember cref="E:System.Web.UI.MobileControls.Command.ItemCommand" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/5ac0ydhh(v=vs.85)">Using ASP.NET Mobile Controls</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/b73x06dt(v=vs.85)">ASP.NET Mobile Web Pages</related>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.