|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
ListViewItem, classe
System.Web.UI.Control
System.Web.UI.WebControls.ListViewItem
System.Web.UI.WebControls.ListViewDataItem
Espace de noms : System.Web.UI.WebControls
Assembly : System.Web.Extensions (dans System.Web.Extensions.dll)
Le type ListViewItem expose les membres suivants.
| Nom | Description | |
|---|---|---|
![]() | Adapter | |
![]() | AppRelativeTemplateSourceDirectory | |
![]() | BindingContainer | Infrastructure. |
![]() | ChildControlsCreated | |
![]() | ClientID | |
![]() | ClientIDMode | |
![]() | ClientIDSeparator | |
![]() | Context | |
![]() | Controls | |
![]() | DataItem | |
![]() | DataItemContainer | |
![]() | DataItemIndex | |
![]() | DataKeysContainer | |
![]() | DesignMode | |
![]() | DisplayIndex | |
![]() | EnableTheming | |
![]() | EnableViewState | |
![]() | Events | |
![]() | HasChildViewState | |
![]() | ID | |
![]() | IdSeparator | Infrastructure. |
![]() | IsChildControlStateCleared | |
![]() | IsTrackingViewState | |
![]() | IsViewStateEnabled | |
![]() | ItemType | |
![]() | LoadViewStateByID | |
![]() | NamingContainer | |
![]() | Page | |
![]() | Parent | |
![]() | RenderingCompatibility | |
![]() | Site | |
![]() | SkinID | |
![]() | TemplateControl | |
![]() | TemplateSourceDirectory | |
![]() | UniqueID | |
![]() | ValidateRequestMode | |
![]() | ViewState | |
![]() | ViewStateIgnoresCase | |
![]() | ViewStateMode | |
![]() | Visible |
| Nom | Description | |
|---|---|---|
![]() | AddedControl | |
![]() | AddParsedSubObject | |
![]() | ApplyStyleSheetSkin | |
![]() | BeginRenderTracing | |
![]() | BuildProfileTree | Infrastructure. |
![]() | ClearCachedClientID | Infrastructure. |
![]() | ClearChildControlState | |
![]() | ClearChildState | |
![]() | ClearChildViewState | |
![]() | ClearEffectiveClientIDMode | Infrastructure. |
![]() | CreateChildControls | |
![]() | CreateControlCollection | |
![]() | DataBind() | |
![]() | DataBind(Boolean) | |
![]() | DataBindChildren | |
![]() | Dispose | |
![]() | EndRenderTracing | |
![]() | EnsureChildControls | |
![]() | EnsureID | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | FindControl(String) | |
![]() | FindControl(String, Int32) | Infrastructure. |
![]() | Focus | |
![]() | GetDesignModeState | Infrastructure. |
![]() | GetHashCode | |
![]() | GetRouteUrl(Object) | |
![]() | GetRouteUrl(RouteValueDictionary) | |
![]() | GetRouteUrl(String, Object) | |
![]() | GetRouteUrl(String, RouteValueDictionary) | |
![]() | GetType | |
![]() | GetUniqueIDRelativeTo | |
![]() | HasControls | |
![]() | HasEvents | |
![]() | IsLiteralContent | Infrastructure. |
![]() | LoadControlState | |
![]() | LoadViewState | |
![]() | MapPathSecure | |
![]() | MemberwiseClone | |
![]() | OnBubbleEvent | |
![]() | OnDataBinding | |
![]() | OnInit | |
![]() | OnLoad | |
![]() | OnPreRender | |
![]() | OnUnload | |
![]() | OpenFile | |
![]() | RaiseBubbleEvent | |
![]() | RemovedControl | |
![]() | Render | |
![]() | RenderChildren | |
![]() | RenderControl(HtmlTextWriter) | |
![]() | RenderControl(HtmlTextWriter, ControlAdapter) | |
![]() | ResolveAdapter | |
![]() | ResolveClientUrl | |
![]() | ResolveUrl | |
![]() | SaveControlState | |
![]() | SaveViewState | |
![]() | SetDesignModeState | |
![]() | SetRenderMethodDelegate | Infrastructure. |
![]() | SetTraceData(Object, Object) | |
![]() | SetTraceData(Object, Object, Object) | |
![]() | ToString | |
![]() | TrackViewState |
| Nom | Description | |
|---|---|---|
![]() | DataBinding | |
![]() | Disposed | |
![]() | Init | |
![]() | Load | |
![]() | PreRender | |
![]() | Unload |
| Nom | Description | |
|---|---|---|
![]() | EnableDynamicData(Type) | Surchargé. |
![]() | EnableDynamicData(Type, Object) | Surchargé. |
![]() | EnableDynamicData(Type, IDictionary<String, Object>) | Surchargé. |
![]() | FindDataSourceControl | |
![]() | FindFieldTemplate | |
![]() | FindMetaTable | |
![]() | GetDefaultValues | |
![]() | GetMetaTable | |
![]() | SetMetaTable(MetaTable) | Surchargé. |
![]() | SetMetaTable(MetaTable, IDictionary<String, Object>) | Surchargé. |
![]() | SetMetaTable(MetaTable, Object) | Surchargé. |
![]() | TryGetMetaTable |
| Nom | Description | |
|---|---|---|
![]() ![]() | IControlBuilderAccessor.ControlBuilder | |
![]() ![]() | IControlDesignerAccessor.GetDesignModeState | |
![]() ![]() | IControlDesignerAccessor.SetDesignModeState | |
![]() ![]() | IControlDesignerAccessor.SetOwnerControl | Infrastructure. |
![]() ![]() | IControlDesignerAccessor.UserData | |
![]() ![]() | IDataBindingsAccessor.DataBindings | |
![]() ![]() | IDataBindingsAccessor.HasDataBindings | |
![]() ![]() | IExpressionsAccessor.Expressions | |
![]() ![]() | IExpressionsAccessor.HasExpressions | |
![]() ![]() | IParserAccessor.AddParsedSubObject |
Note de sécurité |
|---|
<%@ Page language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void ContactsListView_ItemCreated(object sender, ListViewItemEventArgs e) { // Retrieve the current item. ListViewItem item = e.Item; // Verify if the item is a data item. if (item.ItemType == ListViewItemType.DataItem) { // Get the EmailAddressLabel Label control in the item. Label EmailAddressLabel = (Label)item.FindControl("EmailAddressLabel"); // Display the e-mail address in italics. EmailAddressLabel.Font.Italic = true; } } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title>ListViewItem Example</title> <style type="text/css"> body { text-align: center; } .bgcolor { background-color: #CAEEFF; } </style> </head> <body style="font: 10pt Trebuchet MS"> <form id="form1" runat="server"> <h3>ListViewItem Example</h3> <asp:ListView ID="ContactsListView" DataSourceID="ContactsDataSource" InsertItemPosition="LastItem" OnItemCreated="ContactsListView_ItemCreated" runat="server"> <LayoutTemplate> <table cellpadding="2" width="680px" border="0"> <tr class="bgcolor" runat="server"> <th runat="server">First Name</th> <th runat="server">Last Name</th> <th runat="server">E-mail Address</th> </tr> <tr id="itemPlaceholder" runat="server"></tr> </table> <asp:DataPager runat="server" ID="PeopleDataPager"> <Fields> <asp:NumericPagerField ButtonCount="10" /> </Fields> </asp:DataPager> </LayoutTemplate> <ItemTemplate> <tr runat="server"> <td> <asp:Label ID="FirstNameLabel" runat="server" Text='<%#Eval("FirstName") %>' /> </td> <td> <asp:Label ID="LastNameLabel" runat="server" Text='<%#Eval("LastName") %>' /> </td> <td> <asp:Label ID="EmailAddressLabel" runat="server" Text='<%#Eval("EmailAddress") %>' /> </td> </tr> </ItemTemplate> <InsertItemTemplate> <tr class="bgcolor"> <td> <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%#Bind("FirstName") %>' MaxLength="50" /> </td> <td> <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%#Bind("LastName") %>' MaxLength="50" /> <br /> </td> <td> <asp:TextBox ID="EmailAddressTextBox" runat="server" Text='<%#Bind("EmailAddress") %>' MaxLength="50" /> <br /> </td> </tr> <tr class="bgcolor" runat="server"> <td colspan="3"> <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /> <asp:Button ID="CancelInsertButton" runat="server" CommandName="Cancel" Text="Cancel" /> </td> </tr> </InsertItemTemplate> </asp:ListView> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the AdventureWorks sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. --> <asp:SqlDataSource ID="ContactsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorks_DataConnectionString %>" SelectCommand="SELECT FirstName, LastName, EmailAddress FROM Person.Contact" InsertCommand="INSERT INTO Person.Contact ([FirstName], [LastName], [EmailAddress], [PasswordHash], [PasswordSalt]) Values(@FirstName, @LastName, @EmailAddress, '', '')"> </asp:SqlDataSource> </form> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

