选择下拉列表无法在cshtml视图中正确显示

时间:2018-09-18 14:29:04

标签: asp.net-mvc view bootstrap-modal dropdown

以下图像上的下拉菜单无法正确显示。我希望下拉列表覆盖Modal Popup的长度。页面上的按钮正常触发,我的控制器没有问题。解决该问题的任何帮助将不胜感激

enter image description here

查看代码

 <a class="btn w-xs btn-primary" data-toggle="modal" data-target=".bootstrapmodal"><i class="fa fa-book" aria-hidden="true"></i><span id="@ViewBag.Group"> Add New Member</span></a>

<div class="modal fade bootstrapmodal ">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button data-dismiss="modal" class="close"><span>&times;</span></button>
                <div class=" modal-title"><h3>Add User to Active Directory Group @ViewBag.Group </h3></div>    
            </div>
            <div class="modal-body">    
                <div class="content">
                    @using (Html.BeginForm("AddNewUser", "ActiveDirectoryMember", FormMethod.Post, new { enctype = "multipart/form-data", id = "addUser" }))
                    {
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })    
                        @Html.AntiForgeryToken()   
                        <div class="panel ">
                            <div class="panel-body ">
                                <div class="form-horizontal">

                                    <input type="hidden" name="groupName" value="@ViewBag.Group" />
                                    <div class="form-group">
                                        @Html.Label("Technician", new { @class = "control-label col-md-2 required" })
                                        <div class="input-group">
                                            <div class="col-md-8">
                                                <select id="userId" name="userId" class="form-control s2-search-box2">
                                                    <option value="">Click search for a staff member</option>
                                                </select>
                                            </div>
                                        </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-md-2">

                                            </div>
                                            <div class="col-md-2">
                                                <button type="submit" class="btn btn-success" id="addUser">
                                                    <i class="fa fa-plus-circle"></i>
                                                    Add New User
                                                </button>
                                            </div>
                                        </div>

                                    </div>

                                </div>
                        </div>
                    }    
                </div>
            </div>
            <div class="modal-footer">   
                <button class="btn btn-default" data-dismiss="modal">
                    <i class="fa fa-ban"></i>
                    Cancel
                </button>    
            </div>
        </div>
    </div>
</div>

0 个答案:

没有答案