如何在asp.net中使用OR

问题描述:

我将提供以下内容

I will give the following

if((TXTBILLNO.Text = "") || (TXTBILLDATE.Text=""))
        {
            return(false);
        }


但是错误显示在OR运算符上

错误是
运算符||不能应用于字符串类型为string


But the error is displayed on the OR operators

The error is
Operator || cannot be applied to operands of type string to strings

hi,
的操作数 你需要写''=='',

you need to write ''=='' ,
if((TXTBILLNO.Text == "") || (TXTBILLDATE.Text==""))
       {
           return(false);
       }



希望这对您有用.



hopes this works for you.