Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Visual Studio 2013 MVC View Scaffold... BUG?

$
0
0

I noticed a possible BUG while generating a view using the scafold.  If you generate a view using the "Create" template, there seems to be an unintended open <div class="form-group"> tag.  Here is an example after generating a view from a simple model class:

@model FrommAdmin.Model.DDL

@{
    ViewBag.Title = "Test";
}<h2>Test</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal"><h4>DDL</h4><hr />
        @Html.ValidationSummary(true)<div class="form-group"><div class="form-group">
            @Html.LabelFor(model => model.Type, new { @class = "control-label col-md-2" })<div class="col-md-10">
                @Html.EditorFor(model => model.Type)
                @Html.ValidationMessageFor(model => model.Type)</div></div><div class="form-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })<div class="col-md-10">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)</div></div><div class="form-group"><div class="col-md-offset-2 col-md-10"><input type="submit" value="Create" class="btn btn-default" /></div></div></div>
}<div>
    @Html.ActionLink("Back to List", "Index")</div>

The assumed uninteded div is on line 18.

Cheers!

- Jesse Lee 


Viewing all articles
Browse latest Browse all 3509

Trending Articles


Dammapeta Mandal Sarpanch Upa-Sarpanch Mobile Numbers List Khammam District...


Sarah Samis, Emil Bove III


ZARIA CUMMINGS


Need radio code for IVECO Delphi Aptiv FJ5 RBT M16


Black Angus Grilled Artichokes


Ed Sheeran – Sapphire – Pre-Single [iTunes Plus M4A]


Sunny Garcia’s Ex-Wife Colleen McCullough


99 God Status for Whatsapp, Facebook


Funeral of Sir Warwick Franklin


MHDD



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>