【发布时间】:2012-03-09 01:16:56
【问题描述】:
我有以下包含 @Html.DropDownList 的视图:-
<fieldset>
<legend>Answer here</legend>
<div class="editor-label">
@Html.LabelFor(model => model.Description)
</div>
<div class="editor-field" data-toggle="dropdown">
@Html.EditorFor(model => model.Description)
@Html.ValidationMessageFor(model => model.Description)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.IsRight)
</div>
<div class="editor-field">
@Html.DropDownList("IsRight", String.Empty)
@Html.ValidationMessageFor(model => model.IsRight)
</div>
</fieldset>
以及以下显示简单警报消息的 Java 脚本:-
<script type="text/javascript">
function removePartial2() {z
alert('Deletion was successful');
$(this).remove();
}
</script>
我已经从 bootstrap 网站下载了相关的脚本文件(bootstrap-dropdown.js 和 bootstrap-alert.js),但我不知道如何修改上述代码才能同时使用 bootstrap我的 asp.net MVC 中的下拉菜单和引导警报消息。? BR
【问题讨论】:
标签: asp.net-mvc-3 twitter-bootstrap