以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  求助  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=33645)

--  作者:lhls1688
--  发布时间:2013/5/22 10:32:00
--  求助

请问如何判断一个文本输入框的值是否为空值?用nothing好像不行


--  作者:XYT
--  发布时间:2013/5/22 10:35:00
--  

Dim txt As String = e.Form.Controls("TextBox1").Value

txt = ""

[此贴子已经被作者于2013-5-22 10:36:07编辑过]

--  作者:lhls1688
--  发布时间:2013/5/22 10:42:00
--  
Dim jgm As WinForm.ComboBox = e.Form.Controls("调入机构")
If jgm.text Is Nothing Then
    messagebox.Show("调入机构不能为空值,请核对!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If

请问这段代码,为何不工作?

--  作者:XYT
--  发布时间:2013/5/22 10:46:00
--  

jgm.text = ""


--  作者:狐狸爸爸
--  发布时间:2013/5/22 14:50:00
--  

标准答案:

 

if e.Form.Controls("TextBox1").Value Is Nothing Then

end if