您的位置:首页 > 其它

UpdatePanel 动态添加控件

2012-04-22 13:26 363 查看
UpdatePanel 动态添加控件例子,在之前面页要加一个ScriptManager

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: