I have reviewed many solutions most of them are of jQuery .. I dont know how to check modal is open or not ... Actually I want to render the list after modal is open is there any way to do this in razor ....
<div class="modal fade popup-modal" id="myModalMembers" role="dialog" style="margin-top: 50px;height: 267px;">
    <div class=" modal-dialog modal-popup" style="height: 100%;">
        <!-- Modal content-->
        <div class="modal-content content-popup" style="height: 100%;">
            <div class="modal-header" style=" margin-top: -30px;border: none;">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h4 class="modal-title">Choose a Member</h4>
                <p>_________________________________________________________________________________________________________</p>
            </div>
            <br />
            @if ( $('#myModal').hasClass('in')) { // this is where i want to add conditon but i cant add like this there must a proper way to do so
                @Html.DropDownListFor(m => m.MemberModel.SelectedMember, Model.MemberModel.Members, "-- Select Member --", new { @class = "form-control selector" })
            }
            <div class="modal-footer">
                <input type="submit" value="Submit" name="memberSubmit" style="width: 100px;height: 30px;background-color: #254f91;" />
            </div>
        </div>
    </div>
</div>
