473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

<asp:checkbox>

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.
Nov 17 '05 #1
3 2890
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@nospam.com> wrote in message
news:0c****************************@phx.gbl...
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.

Nov 17 '05 #2
C
On submitting the page

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

If chkTest.Checked Then

-----Original Message-----
How are you populating the checkbox? Are you checking to make sure that youare only doing this the first time the page loads?

Show us some code...

"C" <c@nospam.com> wrote in message
news:0c****************************@phx.gbl...
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.

.

Nov 17 '05 #3
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?
-----Original Message-----
How are you populating the checkbox? Are you checking to make sure that youare only doing this the first time the page loads?

Show us some code...

"C" <c@nospam.com> wrote in message
news:0c****************************@phx.gbl...
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.

.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: C | last post by:
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...
1
by: Das | last post by:
Hi All I'm using Temple column in Asp.Net if works fine, but I directly want to set the checked property. With Text Property: it works fin <asp:TemplateColumn HeaderText="Red...
1
by: Liu Xuesong | last post by:
I want to add Attributes into CheckBox in .aspx page <html> <asp:CheckBox id="ChapterCheck" runat="server" /> </html> How to add Attributes in <asp:CheckBox> ?
3
by: z. f. | last post by:
Hi, i'm using code in my aspx page. i have data binding where i use <%# Container.DataItem("DateStart") %> i also use code that makes a loop inside a regular <% %> block how can i pass...
1
by: Ed West | last post by:
Am getting this error with the following code, particularly this line: <%# Check(DataBinder.Eval(Container.DataItem, "broker_id"))%> I am creating checkboxes and the Check function checks to...
1
by: Fao, Sean | last post by:
I'm trying to set the title attribute on a CheckBox and I'm having some issues in ASP.NET 1.1. The title attribute in the following example is valid in HTML 4.01 Transitional: <input...
3
by: Chaprasi | last post by:
hey guys How can I get a value property for the checkbox, I don't want to use the checkbox list. Help is appreciated. Thanks, Chaprasi Bhai
4
by: Mike | last post by:
Hi We are developing an ASP.NET 2.0 application and using the in built Crystal report system that it comes with. We have everything running fine on our development server but when we publish...
0
by: deathtospam | last post by:
A few weeks ago, I created a Classic ASP page that connects to a machine with SQL Server installed on it, prompts the user to select a database on that server, then lists all of user-created stored...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.