using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Spring.DataBinding; public class People { string name; public string Name { get { return name; } set { name = value; } } } public partial class PollutionManage_Spring : System.Web.UI.Page { protected void Page_Load( object sender, EventArgs e) { if ( ! IsPostBack) { BaseBindingManager manager = new BaseBindingManager(); TextBox box = new TextBox(); box.Text = " hello " ; box.ID = " hi " ; this .Form.Controls.Add(box); People p = new People(); p.Name = " jiyang " ; manager.AddBinding( " Name " , " ['hi'].Text " ); manager.BindSourceToTarget(p, this , null ); } } public Control this [ string name] { get { return this .FindControl(name); } } }