using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default5 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Create a Dynamic Button
Button b = new Button();
b.Text = "hello";
//Use of the Lambda expression
b.Click += (s, z) => Response.Write("good");
//add the Control to the WebForm
//form1 is the id of the WebForm
this.FindControl("form1").Controls.Add(b);
}
}
//when you click the button the message good will be displayed.