首页 > 其他 > 详细

xkylw

时间:2016-03-08 21:16:24      阅读:208      评论:0      收藏:0      [点我收藏+]
            <div class="form-group">
                @Html.LabelFor(model => model.Lesson_id, "Lesson_id", htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownList("Lesson_id", null, htmlAttributes: new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Lesson_id, "", new { @class = "text-danger" })
                </div>
            </div>

  

        public ActionResult Create_Course()
        {
            ViewBag.Coupon_id = new SelectList(db.kywkt_Coupon, "Id", "Code");
            ViewBag.Lesson_id = new SelectList(db.kywkt_Lesson, "LID", "Title");
            return View();
        }

MVC5 DropDownList使用 注意位置

@Html.DropDownList("Lesson_id", 

xkylw

原文:http://www.cnblogs.com/qq22144770/p/5255414.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!