Author: WriterOfCode | Posted on: 5/11/2009 8:43:49 PM | Views : 261

I'm working on creating a shopping cart Control from scratch, all goes well until I get to the update portion of my shopping cart's code.

After a textbox is created in the edit portion of the shopping cart, I'm unable to locate it as a child to any control. I'm currently trying a hackish workaround where I use the textChanged event of the TextBox control, but it doesn't fire for whatever reason. I've tried quite a few different tricks and come up empty handed.

Basically, the problem is this: I'm unable to find a textbox control which is created programmatically inside this user control.

I've tried to clean up the code below to hide as much of the garbage I've produced in trying to debug the problem, so hopefully it's 100% accurate.

public void EditHandler(object sender, EventArgs e) //attached to the click event of a button
{
EditButton EB = (EditButton)sender;
SqlDataReader sqlDataReader;
SqlConnection ...

Go to the complete details ...