Dynamically Adding User Controls in ASP.NET
I just got off the phone (at 11:26 Central Time) with a friend who I've been helping for nearly 3 hours to no avail. The problem he has is this:
- ASP.NET 2.0 Web Application Project
- View State Disabled and Forbidden by company practices.
- User Control containing several text boxes and 1 button marked delete.
- Need to lookup n records from the database, and create a User Control for each record in or after the Page Load event.
- Submit button on page has to validate all User Control data and re-draw with values if validation is failed. Write to database on success.
The problem we were stuck on is how to get the button on the user control (Delete) to fire an event when added after Page Load. Any ideas?