Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

asp.net, c# I have only one checkbox, and I want to keep NULL to the SQL server until the user checks the checkbox then change

asp.net, c#

I have only one checkbox, and I want to keep NULL to the SQL server until the user checks the checkbox then change a Null to the 1, which is check, and 0 which is unchecked.

how can I do that?

this is my code from asp.net


and c# code:

if (lblMandatoryAppearance.Checked.Equals(-1)) { lgl_eve.MandatoryAppearance.Equals(0); } else { lgl_eve.MandatoryAppearance = Convert.ToBoolean(lblMandatoryAppearance.Checked); }

I have column in SQL and I want if the user open the web.aspx so many times and do not click on the checkbox, keep it as NULL in the SQL, and any time user open the web.aspx and click on the checkbox, change the value in SQL to 1 which means selected and if user unchecked the checkbox make it to 0 in SQL which is unchecked

in fact, I want to be null as long as a user do not click on the checkbox.

how can I do that, please help.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

Q.1. what is constitution? Q.2. key of the constitution?

Answered: 1 week ago

Question

Q.1. what is meant by federal system?

Answered: 1 week ago

Question

What do you enjoy/not enjoy?

Answered: 1 week ago