none
Convert Code snippet to Bootstap logic RRS feed

  • Question

  • Can someone show me how to convert snippet into boostrap element or bootstrap logic. I am looking for a better way to design this HTML below.

    div class="form-border">
    <table cellpadding="5" cellspacing="5" width="440">
        @{
            //repeatdirection = Horizontal, RepeatColumns = 4
            const int NumberOfColumns = 4;
            int skip = 0;
            var items = Model.Skip(skip).Take(NumberOfColumns);
            while (items.Any())
            {
                <tr>
                    @foreach (var item in items)
                    {
                        <td width="450">
                            <table class="thumbmain">
                                <tr>
                                    <td>
                                        <img src="@Url.Content(item.Resource)" width="260" height="260" class="imageclass" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: center; font-weight: bold; color: Teal">@item.Breed
                                    </td>
                                </tr>
                            </table>
                        </td>
                    }
                </tr>
                skip += NumberOfColumns;
                items = Model.Skip(skip).Take(NumberOfColumns);
            }
        }
    </table>
    </div>


    pianoboyCoder

    • Moved by CoolDadTx Saturday, June 23, 2018 3:47 PM ASP.NET related
    Friday, June 22, 2018 8:46 PM

All replies