User1722694416 posted
Hi
I have a project where i am using dropdown to select the value but when user select the value 0 and assign this value to property then value convert to 0 to nothing.
for e.g.
oIncidentBase.riddorreported = drRIDDOR.SelectedItem.Value // here drriddor value is 0
//property where values assigned
Dim i_riddorreported As Integer
Public Property riddorreported() As Integer
Get
Return i_riddorreported
End Get
Set(ByVal value As Integer)
i_riddorreported = value
End Set
End Property
If i_riddorreported <> Nothing Then // Here this condition became false and code in if condition is not executing.
' Dim paramriddorreported As New SqlParameter("@RIDDORReported", SqlDbType.Int)
' paramriddorreported.Value = i_riddorreported
' oParams.Add(paramriddorreported)
End If
In database storing the default value
Can somebody help me on this how i can store 0 if user select No in database.
Thanks in Advance