Click here to Skip to main content
16,017,944 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on a web application using C#. when I run the program it shows the following Error :-

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: Cannot implicitly convert type string to bool

Source Error:
[No relevant source lines]
Source File: Line: 0

......................................

before page load it shows me the error
PLz Help...................................
Posted
Comments
[no name] 7-Jan-13 0:10am    
Mention your code in your Page_Load event here please. It would help us to track the issue in your code
prashant patil 4987 7-Jan-13 0:21am    
Post your code..
Sergey Alexandrovich Kryukov 7-Jan-13 0:43am    
Who told you that you can use string as Boolean? Experience in something like C?!
—SA

Who told you that you can use string as Boolean? Experience in something like C?!
The error message is self-explaining. You use string as it was Boolean. Don't do it.

And why do you think that you can ask questions without showing any code samples? But try to solve this problem by yourself instead, in this very case. It's way too simple.

—SA
 
Share this answer
 
Hi,
when u storing Bool value into string just use .ToString().
your problem will solved.
JMD:-)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900