最简单的代码啊
Dim str1 As String = e.Form.Contrls("Textbox1").Text
Dim str2 As String = e.Form.Contrls("Textbox2").Text
If str1 <> str Then
msgbox("前后不匹配")
Return
End If