Hi,I need to retrieve the data for Employee details After entering Empno in a 1st text box.I hope it's Simple but i'm Intermediate level in VB.net,Please help ASAP
This is My Coding for VB.NET
Private Sub View_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
con.Open()
cmd = New SqlCommand("regd_regdetail_Empid", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@Empid", TxtEmpID.Text.Trim.ToString)
dr = cmd.ExecuteReader()
If dr.HasRows Then
If dr.Read Then
Label1.Text = dr.GetString(0)
Label2.Text = dr.GetString(1)
Label3.Text = dr.GetString(2)
Label4.Text = dr.GetString(3)
Label5.Text = dr.GetString(4)
Label6.Text = dr.GetString(5)
End If
End If
con.Close()