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

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.

System_CAPS_security Security 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
Available since 3.5
Return to top
Show: