i am display images in repeater ,in first row four images are coming and in second and third row three images are coming,
but four image must display in second and third row, as coming in first row
below is my page html.
<%@ page title="" language="C#" masterpagefile="~/Site1.Master" autoeventwireup="true"
codebehind="product.aspx.cs" inherits="WebApplication21.View.User.product" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/slider.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript" src="js/startstop-slider.js"></script>
<div style="width: 100%; height: 1000px;">
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
<ItemTemplate>
<div class="grid_1_of_4 images_1_of_4">
<%--<a href=""><img src="../../images/slide-3-image.jpg" alt="" style="width:250px;height:250px" /></a>--%>
<asp:Image ID="Image1" runat="server" Style="width: 250px; height: 250px" ImageUrl='<%# Eval("pro_image")%>' />
<h2>
<p>
<span class="rupees">
<asp:Label ID="Label2" runat="server" Text='<%# Eval("pro_name")%>'></asp:Label></span></p>
</h2>
<div class="price-details">
<div class="price-number">
<p>
<span class="rupees">PKR<asp:Label ID="Label1" runat="server" Text='<%# Eval("pro_price")%>'></asp:Label></span></p>
</div>
<div class="add-cart">
<h4>
<a href="preview.html">Add to Cart</a></h4>
</div>
<div class="clear">
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</asp:Content>
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = GetData();
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
private DataSet GetData()
{
string CS = ConfigurationManager.ConnectionStrings["ecom"].ConnectionString;
using (SqlConnection con = new SqlConnection(CS))
{
SqlDataAdapter da = new SqlDataAdapter("select * from tbl_product_items", con);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}
please guide