Dim con As SqlConnection con = New SqlConnection(\"server=chinna; uid=sa; pwd=136018@h; database=icms\") con.Open() Dim cmd As SqlCommand
Should be
cmd = New SqlCommand("select pass from personal where idno='" & TextBox1.Text & "'", con)
beyond that code seems for ASP.net. We can not execute MsgBox in VB.net that can appear on client browser.