2016 系统设计第一期 (档案一)MVC 和 Bootstrap 表单转换
bootstrap
<form role="form"> <div class="form-group"> <label for="name">名称</label> <input type="text" class="form-control" id="name" placeholder="请输入名称"> </div> <button type="submit" class="btn btn-default">提交</button> </form>
MVC
@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" })) <div class="form-group"> <label for="name">名称</label> @Html.TextBox("name", "", new { @class = "form-control", placeholder = "请输入账号" }) </div> <button type="submit" class="btn btn-default">提交</button> }
说明:
@using (Html.BeginForm("Create", "User", FormMethod.Post, new { @class = "form-horizontal" }))
Create:执行的Action
User:控制器Controller
我的小鱼你醒了,
还认识早晨吗?
昨夜你曾经说,
愿夜幕永不开启。
初吻吻别的那个季节,
不是已经哭过了吗?
你的香腮边轻轻滑落的,
是你的泪,还是我的泪。
我的指尖还记忆著,
你慌乱的心跳。
温润的体香里,
那一缕长髮飘飘。
——青青树 《魁拔》
交流群:ASP.NET交流群(2群) 58189568
ExtJs4.2交流群(3群)97869295

浙公网安备 33010602011771号