Solved

Cannot implicitly convert type bool to System.Web.UI.Webcontrols.CheckBox

Posted on 2009-05-03
2
1,194 Views
Last Modified: 2013-12-17
I am reading data from a table in a database.  The data is a type bool.  When I read the data and then try to display that data on the screen to the user I get this error message.  I oringially used a checkbox to save the data and I am trying to read the data back into the checkbox to show if it was check or not.  Can someone point out what I am doing wrong?

Here is the exact error.
Cannot implicitly convert type 'bool?' to 'System.Web.UI.WebControls.CheckBox'      


here is my code:
cbCT = myProviderReferralQueue.CT;

Open in new window

0
Comment
Question by:kwh3856
2 Comments
 
LVL 9

Accepted Solution

by:
tillgeffken earned 500 total points
ID: 24290252
cbCT.Checked = myProviderReferralQueue.CT;
0
 

Author Closing Comment

by:kwh3856
ID: 31577343
Thank you very much.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now