Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI dears !
i have make a page to display services in grid box way. i am populating data by using inline coding and i made a list <> for filling the respective databounds. following is my code for populating the gridbox. the problem is that this displays on the left of the page and in a single column .my requirement is that it should displays as three columns in a row.or any pattern that looking good.
your response will be appreciated.

What I have tried:

ASP
%foreach (var product in product_list)
                                    {%>
                            <div class="blocks">
                                <div class="grid_3 alpha" style="left: 0px; top: 0px; width: 289px;">
                                    <img src="<%=product.img %>" alt="" class="img_inner">
                                    <div class="text1"><a href="OrderBook.aspx"><%=product.name%></a></div>
                                    <div class="center">
                                   <asp:Label runat="server" Text="Price" Font-Bold="True"></asp:Label> <%=product.price %>
                                    <br />
                                   <a href="_Services.aspx?pro_id=<%=product.id %>&action=add"  class="l1" onclick="book_click">BOOK NOW </a>
                                        <br />
                                        <asp:Label ID="Label1" runat="server"></asp:Label>
                                        <br />
                                        <asp:Button ID="Button1" runat="server" BackColor="Fuchsia" BorderColor="Black" BorderStyle="Inset" PostBackUrl="~/datalist.aspx" Text="Check Cart" OnClick="Button1_Click" />
                                    </div>
                                </div>
Posted
Updated 7-Jan-18 0:59am
v2
Comments
Maciej Los 7-Jan-18 7:00am    
Note that we can't see your screen and we aren't able to read in your mind. You should provide more information about the data stored in a List<OfSomething>
Member 13606640 12-Jan-18 13:26pm    
List of class<products> which isw getting and setting the values of Id, name,price and image url of the product.
i.e.
public class products
{
public string id { get; set; }
public string name { get; set; }
public string price { get; set; }
public string img { get; set; }
public products(string id,string name,string price,string img)
{
this.id = id;
this.name = name;
this.price = price;
this.img = img;
}
}
Member 13606640 12-Jan-18 13:25pm    
yes, i want to make minimum four columns but in my case it is only one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900