Dynamic controls and event handlers

Question: I am trying to create an ASP.NET 2.0 Web site with dynamic controls. Really what I am looking for is basically to have a label and a button on the page. When the user clicks the button I need to set the text field of the label to some value. Unfortunately, I can’t seem to figure it out. How would I create controls within an ASP.NET web page dynamically? My code works fine with Windows Forms but within ASP.NET I keep getting some type of server error. Any code examples or pointers you can have?

 

Answer: Using both Windows Forms and ASP.NET you can create dynamic controls. Of course given the two model there are some differences between the two. For example, you can create a button on a Windows form using the following code. <<Read More>>

 

<<View Dynamic controls and event handlers>>