foreach (System.Web.UI.Control ctl in this.Controls)
{
if (ctl.GetType() == typeof(ImageButton))
{
if (i < dt.Rows.Count)
{
ImageButton pImg = (ImageButton)ctl;
pImg.ImageUrl = Page.ResolveUrl("~" + dt.Rows[i]["SimpleImgUrl"].ToString());
i++;
}
}
}
遍历ASP.Net页面的某个控件
最新推荐文章于 2021-06-17 03:20:07 发布