Q: 如何为Html.TextBoxFor控件添加多个属性?
A: @Html.TextBoxFor(m => m.Email, new Dictionary<string, object>() { {"class", "input-material" }, {"data-msg", "Please enter your username" },{ "required", "true"} })
Q: 如何为输出HTML格式的字符串?
A: @Html.Raw(ViewBag.Content)
原文地址:https://www.cnblogs.com/mercator/p/12356735.html
时间: 2024-10-13 20:58:26