<asp:checkbox>

  • Thread starter Thread starter C
  • Start date Start date
C

C

Hi,

I have an asp server side checkbox as below.

I have a page where users can edit their user record.

I set this checkbox to true based on a value in a
database.

<asp:checkbox id="chkTest" Runat="server"></asp:checkbox>

If the user unchecks the checkbox and submits the page I
update my database.

However, when I check if it is unchecked it still says
that it is checked.

Why is this?

Thanks,
C.
 
How are you populating the checkbox? Are you checking to make sure that you
are only doing this the first time the page loads?

Show us some code...
 
On submitting the page

I use the following code to check if it is checked.

If chkTest.Checked Then
 
I check by using following code.

If chkTest.Checked Then
'checked
Else
'unchecked
End If

And it is always True whether it is checked by the user
or not?
 
Back
Top