我想打一個項目,將檢測哪個文本框爲空,而不是檢測空白文本框
If txtInterviewee.Text = String.Empty Or txtInterviewed.Text = String.Empty Or txtValidated.Text = String.Empty Or _
txtResidence.Text = String.Empty Or dtpValidated.Text = String.Empty Or txtLastName.Text = String.Empty Or _
txtFirstName.Text = String.Empty Or txtMiddleName.Text = String.Empty Or txtAddress.Text = String.Empty Or _
cmbGender.Text = String.Empty Or cmbCivilStatus.Text = String.Empty Or dtpBirthDay.Text = String.Empty Or _
txtBirthPlace.Text = String.Empty Or txtCitizenship.Text = String.Empty Then
MsgBox("Must fill the following Fields")
End If
如果任何一個文本框爲空,vb.net文本標記我希望它被標記或東西因此用戶將知道需要填寫哪個文本框。
查看ErrorProvider組件或從循環中鏈接消息 – Plutonix