.NET Framework Class Library
ListView.ConvertEmptyStringToNull Property
Gets or sets a value that indicates whether empty string values ("") are automatically converted to null values when the data field is updated in the data source.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Syntax
Visual Basic
Public Overridable Property ConvertEmptyStringToNull As Boolean
C#
public virtual bool ConvertEmptyStringToNull { get; set; }
Visual C++
public: virtual property bool ConvertEmptyStringToNull { bool get (); void set (bool value); }
F#
abstract ConvertEmptyStringToNull : bool with get, set override ConvertEmptyStringToNull : bool with get, set
ASP.NET
<asp:ListView ConvertEmptyStringToNull="True|False" />
Property Value
Type: System.Booleantrue if empty string values are automatically converted to null values; otherwise, false. The default is true.
Remarks
The Parameter object of the data source control that the ListView control is bound to also has a property named Parameter.ConvertEmptyStringToNull. This property performs the same function. Make sure that both properties are set appropriately.
Version Information
.NET Framework
Supported in: 4, 3.5Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also