如何在asp.net中使用OR [英] How to use OR in asp.net

查看:90
本文介绍了如何在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.


这篇关于如何在asp.net中使用OR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆