I want to loop through my datatable rows and check for valid email addresses, if the address is valid, I want to add the row to the database, if not I want to add it to another datatable, but my main problem at the moment is checking for a valid email address, the code I have so far is
VB Code:
'Loop through the rows of the DataTable Do While i <= dt.Rows.Count - 1 checkEmail = dt.Rows(i).Item("E-Mail") 'If curCat = "" Then If InStr(checkEmail, "@") = 1 Then 'prevCat = curCat lblMessage.Text = "Email Checked" 'Dim shRow As DataRow = dt.NewRow 'dt.Rows.InsertAt(shRow, i) i += 1 End If i += 1 Loop
