473,395 Members | 2,436 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,395 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 2891
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.