From the looks of things, you can make Simple Modal work using its most basic invocation. It sounds like you're using ASP.NET WebForms so you could do something like this:
MyPage.aspx
...
<asp:Button ID="btnPopupTrigger" runat="server" OnClick="OpenPopup" Text="Open Popup" />
...
<asp:Panel ID="pnlPopup" runat="server" CssClass="pnlPopup" Visible="false">
<asp:TextBox ID="txtInput" runat="server" />
...
</asp:Panel>
<script type="text/javascript">
$("div.pnlPopup").modal();
</script>
...
MyPage.aspx.cs
...
protected void OpenPopup(object sender, EventArgs e)
{
pnlPopup.Visible = true;
}
...
What this will do is hide the popup content until you want it to be shown. Once the asp:Panel is made visible, the jQuery will find it and make use of the SimpleModal plugin to make it display appropriately. This all requires that you're using standard postbacks, no asp:UpdatePanels or AJAX calls.
One issue you may run into is that it looks like this plugin grabs the modal content and appends it to the <body>
element. ASP.NET expects to see those modal inputs within its <form>
, so you might need to tweak the plugin to append the modal to <form>
instead of <body>
.