How do I insert an If Else Statement here when I want to display the studentID and loginID if there is no student name/address.
Sub ShowStudentInfo()
Dim dt As DataTable = GetInfoForStudent("test", frmLogin.txtusername.Text, frmLogin.txtPassword.Text)
With dt.Rows(0)
frmLibrary.txtStudentID.Text = .Item("StudentID")
frmLibrary.txtLoginID.Text = .Item("LoginID")
frmLibrary.txtStudentName.Text = .Item("Student Name")
frmLibrary.txtStudentAddress.Text = .Item("Student address")
End With
End Sub
Is that what you were looking for?