我想在一个 MsgBox 中包含多条消息,使用\n
. 当显示 MsgBox 时,我需要删除此字符串。
这是我的代码。
Dim Msg As String = ""
Dim EmployeeFirstName As String
Dim EmployeeLastName As String
EmployeeFirstName = txtFirstName.Text.Trim
EmployeeLastName = txtLastName.Text.Trim
If EmployeeFirstName = "" Then
Msg = "Please enter First Name!"
Msg += "/n"
End If
If EmployeeLastName = "" Then
Msg += "Please enter Last Name!"
Msg += "/n"
End If
If ddlGender.SelectedItem.Value = -1 Then
Msg += "Plrase Select department"
Msg += "/n"
End If
MsgBox(Msg)