Here's a link to test for a valid email address with regular expression:
http://www.vbforums.com/showthread.php?t=407441
and you should also check:
http://www.regular-expressions.info/email.html
and you'll notice that there's not any bullet-proof method to test email address validity.
Manal answered your first question, but here's a slightly improved version:
If String.IsNullOrEmpty(installment1.Text) Then
' Empty value
Balance.Text = ""
Else
Try
Balance.Text = (coursefees - CDbl(installment1.Text)).ToString
Catch ex As Exception
' installment1.Text was not a numerical value
Balance.Text = ""
End Try
End If
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Offline 1,024 posts
since Aug 2008