从Page获取请求值,便于页面控制器设定默认值
大石头 编写于 2017-11-01 17:49:06
X
@{
    var formatStr = (Model is String) ? Model : "yyyy-MM-dd";
    var p = ViewBag.Page as Pager;
}
<div class="form-group">
    <label for="dtStart" class="control-label">时间:</label>
    <div class="input-group">
        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
        <input name="dtStart" id="dtStart" value="@p["dtStart"]" dateformat="@formatStr" class="form-control form_datetime" />
    </div>
</div>
<div class="form-group">
    <label for="dtEnd" class="control-label">至</label>
    <div class="input-group">
        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
        <input name="dtEnd" id="dtEnd" value="@p["dtEnd"]" dateformat="@formatStr" class="form-control form_datetime" />
    </div>
</div>