I have user control with modal popup which is used to show popup whenever necessary.
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-sm">
<asp:UpdatePanel ID="upModal" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×</button>
<h4 class="modal-title">
<asp:Label ID="lblModalTitle" runat="server"></asp:Label></h4>
</div>
<div class="modal-body">
<asp:Label ID="lblModalBody" runat="server"></asp:Label>
</div>
<div class="modal-footer">
<button class="btn btn-info" data-dismiss="modal" aria-hidden="true">
Close</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
And back end
private string _Title = null;
public string Title
{
get
{
return _Title;
}
set
{
_Title = value;
}
}
private string _message = null;
public string Message
{
get
{
return _message;
}
set
{
_message = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (_Title != null)
{
lblModalTitle.Text = _Title;
lblModalBody.Text = _message;
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$('#myModal').modal({backdrop: 'static',keyboard: false});", true);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$('#myModal').on('shown.bs.modal', function () { $('#lblModalTitle').focus();})", true);
upModal.Update();
}
}
Now I have aspx page. after the user clicks, server click event generates and after the operation ends I want to show popup with this user control.
what should I have to do that ? currently I implemented interface with method and overridden that method and accessed that in aspx page.