Export (0) Print
Expand All
Expand Minimize

ListView.InsertItemPosition Property

Gets or sets the location of the InsertItemTemplate template when it is rendered as part of the ListView control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

abstract InsertItemPosition : InsertItemPosition with get, set 
override InsertItemPosition : InsertItemPosition with get, set
<asp:ListView InsertItemPosition="InsertItemPosition" />

Property Value

Type: System.Web.UI.WebControls.InsertItemPosition
One of the InsertItemPosition values. The default is InsertItemPosition.None, which indicates that the InsertItemTemplate content will not be rendered by the ListView control.

The following table lists the available item position values.

Row type

Description

InsertItemPosition.FirstItem

Renders the InsertItemTemplate template as the first item in the ListView control.

InsertItemPosition.LastItem

Renders the InsertItemTemplate template as the last item in the ListView control.

InsertItemPosition.None

Does not render the InsertItemTemplate template.

The following example shows how to configure a ListView control to display the InsertItemTemplate template. This code example is part of a larger example provided for the ItemInserted event.

Security noteSecurity Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft