我想通过 C# 在 datalist Itemtemplate 中插入 asp 图像控件。这是我目前正在尝试的下面的代码,但它没有用。
DataList DataListCampaign = new DataList();
DataListCampaign.RepeatLayout = RepeatLayout.Flow ;
DataListCampaign.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal;
DataListCampaign.DataSource = CampTabImage;
DataListCampaign.DataBind();
Image TabImages = new Image();
TabImages.ID = "TabImages";
DataListCampaign.Controls.Add(TabImages);
TabContainer1.Tabs[k].Controls.Add(DataListCampaign);
哪里有问题??