MVC开发小结
调试:先在后台设置断点,然后点击启动,在页面中输入调试后台的路径
1、在cshtml页面增加CSS
@section css
{
<style>
css...
</style>
}
2、在cshtml页面增加JS
@section script
{
<script type="text/javascript">
js...
</script>
}
3、登录(前后台)
@*@Html.ValidationSummary(true)
<div class="form-group" style="height:40px;margin-top:50px">
<div class="row">
@Html.LabelFor(m => m.UserName, new { @class = "col-md-5 control-label", @style = "text-
align:right", @for = "UserName" })
<div class=" col-md-7">
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control", placeholder = "请输入用
户名", @style = "width:240px;", id = "account" })
@Html.ValidationMessageFor(m => m.UserName)
</div>
</div>
</div>
<div class="form-group" style="height:40px;">
<div class="row">
@Html.LabelFor(m => m.UserPwd, new { @class = "col-md-5 control-label", @style = "text-
align:right", @for = "UserPwd" })
<div class=" col-md-7">
@Html.PasswordFor(m => m.UserPwd, new { @class = "form-control", placeholder = "请输入密
码", @style = "width:240px;", id = "pwd" })
@Html.ValidationMessageFor(m => m.UserPwd)
</div>
</div>
</div>*@
<div class="form-group">
<div class="col-md-2 col-xs-4">
<input type="submit" value=" 登录" class="btn btn-default" /> <input type="reset"
value=" 重置" class="btn btn-default" />
</div>
</div>
浙公网安备 33010602011771号