I am using HTML modal,
HTML
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Server Message</h4>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table mb30">
<thead>
<tr>
<th>#</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Return Message</td>
<td><asp:Label ID="Label1" class="col-sm-8 control-label" runat="server" Text="Label"></asp:Label></td>
</tr>
<tr>
<td>2</td>
<td>Return ID</td>
<td><asp:Label ID="Label2" class="col-sm-8 control-label" runat="server" Text="Label"></asp:Label></td>
</tr>
<tr>
<td>3</td>
<td>Return Status</td>
<td><asp:Label ID="Label3" class="col-sm-8 control-label" runat="server" Text="Label"></asp:Label></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
I tried to open this model from C # code after function using
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "none", "<script>$('#myModal').modal('show');</script>", false);
For some reason it does not work.
I want to show this modal at the end of a save function with return values. This modal can be opened at the click of a button, but how can I open this modal from the C # function?
source
share