Basically here is the main part of the code that contains the error:
...
var lname = Request["lastName"];
var comment = Request["comment"];
var sex = Request["sex"];
var title = "";
if(sex = "woman"){
title = "Misses ";
} else {
title = "Mister ";
}
...
When i run the site and submit the form it gives me the following Compiler Error Message: CS0029: Cannot implicitly convert type ‘string’ to ‘bool’:
Does anyone have a solution to this?
Every suggestion is much appreciated.
It should be
And you can consider using ternary operator