G
Guest
I have an ASP.net user control (userName) that is being dynamically loaded into a panel (pnlSearch) in another user control (userSearch). My question is, how do I access the form elements in userName from userSearch. I am able to manipulate the Visible property along with the ID using the following line of code (dependent upon which property I use
Control userFirst = pnlSearch.Controls[0].FindControl("txtFirstName")
Response.Write(userFirst.ID)
I tried using System.Web.UI.WebControls.TextBox instead of Control, but it would throw an error. If anyone could please help me out I would greatly appreciate it
Jim
Control userFirst = pnlSearch.Controls[0].FindControl("txtFirstName")
Response.Write(userFirst.ID)
I tried using System.Web.UI.WebControls.TextBox instead of Control, but it would throw an error. If anyone could please help me out I would greatly appreciate it
Jim