asp.net cstml模式下 input text value值不被清空

asp.net aspx模式<input class="className" value="<%=ViewData["className"]==null?:ViewData["className"] % > "/>
在asp.net cstml模式下代码如何编写?

您好,
在cshtml中,您可以用Viewbag 去保存值.

<input type="text" class="form-control" maxlength="11" id="crimeRef" 
name="crimeRef" placeholder="Crime reference" 
value="@(ViewBag.SomePropertyName?? String.Empty)" >