mercredi 6 juillet 2016

Dropdown value coming blank but still going in IF condition

While submitting a form, I am not selecting any value from the dropdownlist and I am checking condition as

if (Request.Form["CmbNextUser"] != Session["UserId"].ToString() || Request.Form["CmbNextUser"] != null || Request.Form["CmbNextUser"] != "")
        {
            TransferMail();
        }

So, while debugging my value comes as like below.

IMG

The value is coming blank but still it is going in the IF condition

Aucun commentaire:

Enregistrer un commentaire