当我使用 Html.BeginForm
时,语义 UI 将运行并使用经典 UI。
如何解决这个问题?
@using (Html.BeginForm())
{
<div id="addRestaurant">
<form class="ui form">
<div class="required field">
<label for="resName">Restaurant Name</label>
<input type="text" name="model.RestaurantName" id="RestaurantName"/>
</div>
...
</div>
}
最佳答案
将类应用于mvc表单
<div id="addRestaurant">
@using (Html.BeginForm("ActionName","ControllerName", method: FormMethod.Post, htmlAttributes: new { @class="ui form"} )) {
<div class="required field">
<label for="resName">Restaurant Name</label>
<input type="text" name="model.RestaurantName" id="RestaurantName"/>
</div>
...
}
</div>
关于css - 使用 Html.BeginForm 和语义 UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40358292/