这是我的圣诞佳肴。
<div class="modal-body mbody">
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<asp:Repeater ID="repid" runat="server">
<ItemTemplate>
<img alt="" style='height: 275px; width: 275px' src='<%# Eval("imgPath") %>' />
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</ContentTemplate>
</div>这是我的.cs部分,我在页面中包含了这个事件,我的意思是中继器是与数据库绑定的。
public void bindslide()
{
//string str = Session["userid"].ToString();
string str = "22";
sq.connection();
SqlCommand cmd = new SqlCommand("select * from mygallary where regId_img='" + str + "' ", sq.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
repid.DataSource = ds;
repid.DataBind();
sq.con.Dispose();
sq.con.Close();
}结果是,图像是并排加载的,而不是sliding.Where,我出错了吗?
编辑,,这是我得到的。

发布于 2014-08-08 02:32:48
您的item和item active类丢失在code.You中,可以修改中继器,并在ItemTemplate中分别添加<div class='item'>和<div class='item active'>。
<asp:Repeater ID="repid" runat="server">
<ItemTemplate>
<div class="item" >
<div class="item active">
<asp:Image ID="imgId" runat="server" ImageUrl='<%#Eval("imgPath") %>' />
</div>
</div>
</ItemTemplate>
</asp:Repeater> https://stackoverflow.com/questions/25187217
复制相似问题