LinqDataSourceUpdateEventArgs::NewObject Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the object that contains the values that will be saved in the data source.

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

property Object^ NewObject {
	Object^ get();

Property Value

Type: System::Object^

An object of the type specified in the TableName property that contains the data to save.

Create an event handler for the Updating event and retrieve the NewObject property to validate the data. You can also change the data or cancel the update operation.

The following example shows an event handler for the Updating event. The example shows how to compare properties from the OriginalObject property and the NewObject property to determine whether the value in the Category property has changed. If so, the CategoryChanged property of the object in the NewObject property is set to true.

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

.NET Framework
Available since 3.5
Return to top