Checkboxfield Storing 1 instead of -1 for True

M

mike.aes

(ASP.net 2.0)
I am using a Gridview control that is bound to a table in my SQL
database. For some reason, when the Checkbox is clicked, it stores a 1
(Positive 1) in the bound field instead of a -1 (Negative 1). Any
ideas what's going on?
 
J

Jon Paal

because it's working properly .

0/1 = false/true

although any non-zero value can be used as true, the normal convention is to use 1
 
M

mike.aes

I thought it was -1.
Set a breakpoint in your VB.net code and type the following into a
command/immediate window:
? true= 1 (comes back with False)
? true= -1 (comes back with True)

No?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top