TemplateField.ConvertEmptyStringToNull Property
.NET Framework 3.0
Gets or sets a value indicating whether the value that the TemplateField object is bound to should be converted to a null reference (Nothing in Visual Basic) if it is Empty.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: virtual property bool ConvertEmptyStringToNull { bool get (); void set (bool value); }
/** @property */ public boolean get_ConvertEmptyStringToNull () /** @property */ public void set_ConvertEmptyStringToNull (boolean value)
public function get ConvertEmptyStringToNull () : boolean public function set ConvertEmptyStringToNull (value : boolean)
Not applicable.
Property Value
true if the value that the TemplateField is bound to should be converted to a null reference (Nothing in Visual Basic) when it is Empty; otherwise, false. The default value is false.This property applies to two-way data-binding statements made in the template. The conversion is done after extracting the values from the two-way bound template, and before passing the values to the data source for an update or insertion operation.
For example, a user might enter an empty string ("") for a field value when updating or inserting records. Use the ConvertEmptyStringToNull property to specify whether an empty string value is automatically converted to a null reference (Nothing in Visual Basic) when the data field is updated in the data source.
Community Additions
ADD
Show: