Hi ramco1917,
You need to close the modal from code behind.
Refer below example.
HTML
<div class="container-fluid" style="margin-top: 20px;">
<asp:Button ID="btnOpen" runat="server" class="btn bg-primary" Text="Open" OnClientClick="ShowModal();return false;" />
<div id="MyPopup" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Add Nominee</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
<div class="form-horizontal">
<div class="modal-body" style="padding-left: 40px; padding-right: 20px;">
<div class="row">
<div class="col-lg-6">
</div>
<div class="modal-body">
<label>Nominee</label> <span style="color: red">*</span>
<asp:ListBox ID="lstNominee" runat="server" data-placeholder="Choose Nominee"
class="form-control multiselect-full-featured" multiple="multiple"
SelectionMode="Multiple" data-fouc=""></asp:ListBox>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<asp:Button ID="btnSave" runat="server" class="btn bg-primary" Text="Save" OnClick="btnSubmit_Click" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript">
function CloseModal() {
$("#MyPopup").modal("hide");
}
function ShowModal() {
$("#MyPopup").modal("show");
}
</script>
Code
C#
protected void btnSubmit_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseModal();", true);
}
VB.Net
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
ClientScript.RegisterStartupScript(Me.GetType(), "alert", "CloseModal();", True)
End Sub
Screenshot