I have about ten textboxes on an asp.net web form, on button click when an ID of a user is entered into a textbox the other textboxes are populated with related information using the code below. Now I need to add another button where users can click to add all the textboxes dynamically and another button to fill the textboxes automatically with related information when user ID is entered like below. I can create the textboxes dynamically, but can't get the data populated automatically on the button click event handler using same approach below. Any help please.
Protected Sub empselect_Click(sender As Object, e As System.EventArgs) Handles empselect.Click
cmd = New SqlCommand("SELECT EmpID, FName,LName,DeptID, Shift FROM tblEmployees Where EmpID = " + emp_gmin1.Text, conn)
Try
'Open the connection
conn.Open()
lrd = cmd. ...
Go to the complete details ...