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)

public:
virtual property InsertItemPosition InsertItemPosition {
	InsertItemPosition get ();
	void set (InsertItemPosition value);
}

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.6, 4.5, 4, 3.5
Show:
© 2015 Microsoft