我使用了中继器,我想增加htmlcaption1
像htmlcaption2
,htmlcaption3
....:
<asp:Repeater ID="RepeaterBigBanner" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<img src="<%#DataBinder.Eval(Container.DataItem,"BannerPath")%>"alt="#htmlcaption1"" />
</ItemTemplate>
<SeparatorTemplate>
</SeparatorTemplate>
</asp:Repeater>
cs侧:
sqlConn.Open();
sqlComm = sqlConn.CreateCommand();
sqlComm.Connection = sqlConn;
sqlComm.CommandText = "select Top(11) * from BannerYonetim where GosterimYeri='W' and Aktif=0 and BaslangicTarihi<getdate() and BitisTarihi>getdate() order by BaslangicTarihi";
sqlComm.CommandType = CommandType.Text;
SqlDataAdapter mySqlAdapter = new SqlDataAdapter(sqlComm);
DataSet myDataSet = new DataSet();
mySqlAdapter.Fill(myDataSet);
RepeaterBigBanner.DataSource = myDataSet;
RepeaterBigBanner.DataBind();
我怎样才能增加alt="#htmlcaption1"
像:#htmlcaption2
,#htmlcaption3
... #htmlcaption11
?
谢谢你的回答