none
Convert Code snippet to Bootstap logic

    Pertanyaan

  • 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

    • Dipindahkan oleh CoolDadTxMVP Sabtu, 23 Juni 2018 15.47 ASP.NET related
    Jumat, 22 Juni 2018 20.46

Semua Balasan