Monday, October 29, 2007

Ajax UpdatePanel (13) Programic UpdatePanel


protected void Page_Load(object sender, EventArgs e)

{

UpdatePanel up = new UpdatePanel();

up.ID = "UpdatePanel1";

this.Form.Controls.Add(up);

LiteralControl lc = new LiteralControl(DateTime.Now.ToString());

up.ContentTemplateContainer.Controls.Add(lc);

Button btn = new Button();

btn.Text = "Refresh";

up.ContentTemplateContainer.Controls.Add(btn);

}

blog comments powered by Disqus