以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  窗口判断文本框中的值为空,提示错误怎么写  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=26633)

--  作者:慧明和谐
--  发布时间:2012/12/10 18:59:00
--  窗口判断文本框中的值为空,提示错误怎么写

窗口判断文本框中的值为空,提示错误怎么写 

Dim s As String =e.Form.Controls("TextBox3").Value
If s.Length = 0  Then
MessageBox.Show("错误!")
e.Form.Close

 

不行啊  而且按tab键后,value属性也没有 只能自己输入  判断字符串是否为空怎么写 我是初学者...


--  作者:nblwar
--  发布时间:2012/12/10 19:15:00
--  

If s = “” Then

 

END  IF

[此贴子已经被作者于2012-12-10 19:15:11编辑过]

--  作者:有点甜
--  发布时间:2012/12/10 21:40:00
--  
If e.Form.Controls("TextBox3").Value Is Nothing Then
    MessageBox.Show("没有输入内容!")
End If

--  作者:pc005637
--  发布时间:2013/2/6 18:45:00
--  不行.
不行.
--  作者:jianjingmaoyi
--  发布时间:2013/2/6 20:30:00
--  

对的,没错。