您的位置:首页 > 编程语言

用后台代码动态为前台DIV添加标签,控件

2013-08-01 10:19 363 查看
<div runat ="server" id ="maindiv" style =" border-width:0px;">
        
        </div>


Image image = new Image();
                image.ImageUrl = "~/images/" + tempEle.GetAttribute("Value");
                image.Attributes.Add("width", width + "px");
                image.Attributes.Add("height", height + "px");
                image.Attributes.Add("marge-left",tempEle.GetAttribute("X"));
                image.Attributes.Add("marge-top", tempEle.GetAttribute("Y"));
                this.maindiv.Controls.Add(image);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: