<asp:checkbox>

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.
 
M

Marina

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...
 
C

C

On submitting the page

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

If chkTest.Checked Then
 
C

C

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?
 

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

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top