现在我用VB编写的ASP。NET中判断是否空值用什么函数,我用下面语句块提示错误:
Public Function showreply(ByVal a As String)
Dim aa As String
If isnull(a) then
aa = "未回复"
Else
aa = "已回复"
End If
Return aa
End Function
请问应如何更正,在线等待
Public Function showreply(ByVal a As String)
Dim aa As String
If isnull(a) then
aa = "未回复"
Else
aa = "已回复"
End If
Return aa
End Function
请问应如何更正,在线等待
解决方案 »
- 急!!!请问怎么在 ASP.NET 脚本 里面调用已读取的数据的 字段
- 各位大侠 一个text控件,要求里面显示的内容是当前登陆用户的名字
- 关于表单的提交问题~~~
- 小数如何转换成百分数???
- 请问在vs2003中怎么报这错误?我应该怎么处理才行?能不能说说具体操作步骤?谢谢!
- conn.MakeInParam("@defakj",SqlDbType.Bit,1,Convert.ToBoolean("0")) 为什么说Bool转换错误?
- 急急急急急急急急急急!!!Sql Server2000的Reporting Services谁用过啊?怎么把做好的rdl放到aspx里啊?
- 不懂!不懂!就是不懂!
- 谁有能体现.net特性的好源码供初学者学习,请推荐,谢谢!(最好用c#)
- datagrid的select列的写法!!
- JS弹出窗口问题,急`~~~~
- xmldocument 怎样直接转化成文本
a=string.empty
a==""
a isempty
len(a)==0
都不行,因为我这里的参数a有可能是空值,因此会出现错误
现在用
if a is nothing then
……
end if
却判断不出来,有时候数据库明明是空值它返回还是false,请问还有哪里错了
Dim aa As String
If a <> "" then
aa = "未回复"
Else
aa = "已回复"
End If
Return aa
End Function
因为该函数使用过程中的参数有可能是空值(null)
Dim aa As String
If a="" then
aa = "未回复"
Else
aa = "已回复"
End If
Return aa
End Function
ByVal a As String
因为实际输入参数可能是空值(null),如果是这个问题的话应该怎么改
运算符对 类型“DBNull” 和 字符串“” 无效。
Dim aa As String
If a=noting or a="" then
aa = "未回复"
Else
aa = "已回复"
End If
Return aa
End Function
bbb="未回复"
else
bbb="已经回复"
end if