Q:

C# .NET Web Form ListView separate into half

I have a ListView which will only display all the items at the left side, how can I separate half of them into the right side? Below is the item I would like to display in my ListView, I had tried using CSS and table but still no luck.

        <span style="color: #000000;">

            <asp:Image ID="ImagePathLabel" runat="server" ImageUrl='<%# Eval("ImagePath","~/Images/{0}") %>' /><br />
            <asp:Label ID="LabelLabel" runat="server" Text='<%# Eval("Label") %>' />
            <br />
                <td>Model:
                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
                <br />
                Price:RM
        <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price") %>' />
                <br />
                Stock Availability:
        <asp:Label ID="QuantityInStockLabel" runat="server" Text='<%# Eval("QuantityInStock") %>' />
                <br />

                Total Sold:
        <asp:Label ID="QuantitySoldLabel" runat="server" Text='<%# Eval("QuantitySold") %>' />
                <br />
                Category:
        <asp:Label ID="CategoryLabel" runat="server" Text='<%# Eval("Category.CName") %>' />
                <br />
                Status:
        <asp:Label ID="StatusLabel" runat="server" Text='<%# Eval("Status") %>' />
                <br />
                <asp:Button ID="addToCart" runat="server" CausesValidation="false" CommandName="AddToCart" CommandArgument='<%# Eval("Id")%>' Text="Add To Cart" CssClass="btn btn-default"></asp:Button>
                <br />
                <br />
        </span>

    </ItemTemplate>

A:

You have to work with css
to split yout controls in two parts you have just to affect some classes to your asp.net controls.
if you are using  bootstrap it is easy to use bootstrap grid system(I see that you are using classes for button from bootstrap)
http://getbootstrap.com/css/#grid-example-basic
it is an explanation for the system
else you have just to add two divs for example and set each one with width 50% and affect to one of them float left
it will be ok
or use a table with width you have 4 columns you can affect each one to a column and set the width to 20% for label and 30% for value(the same for boostrap: use the class md-2 for label and md4 for value and add row for each line)
I hope that this helps you

