in .net
use Textbox.Text property
Code part
If Textbox2.Text = Textbox1.Text Then
Msgbox ("Found")
Else
Msgbox ("Not Found")
End If
You can use this code with Button Click Event or Textbox Textchanged Event
Here is one another issue that Textbox1.Text can be substring of Textbox2.Text