dimanche 26 juin 2016

how to insert if else in equal statement

I need to set the condition as below code.

_orderStatus = Request.QueryString["order"] != null ? Request.QueryString["order"] : _orderStatus != "" ? _orderStatus : "pending";

Currently the condition only applied to show pending order. How can i change and add to get as below condtion:

if Request.QueryString["order"] != null then _orderStatus: "pending" else _orderStatus: "confirmed"

Thanks

Aucun commentaire:

Enregistrer un commentaire