a | b | |
---|
| 0 | + | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CodeSnippet.aspx.cs" Inherits="Playground.CodeSnippet" %> |
---|
| 0 | + | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 0 | + | <html xmlns="http://www.w3.org/1999/xhtml" > |
---|
| 0 | + | <head id="ctlHead" runat="server"> |
---|
| 0 | + | <title>Playground</title> |
---|
| 0 | + | <script src="jquery-1.3.2.min.js" type="text/javascript"></script> |
---|
| 0 | + | <script src="jquery.blockUI.js" type="text/javascript"></script> |
---|
| 0 | + | </head> |
---|
| 0 | + | <body> |
---|
| 0 | + | <form id="ctlForm" runat="server"> |
---|
| 0 | + | <asp:Button id="ctlAddContact" runat="server" Text="Add Contact" /> |
---|
| 0 | + | <div id="ctlAddContactModal" style="display: none;"> |
---|
| 0 | + | <h3>Add Contact</h3> |
---|
| 0 | + | <asp:Label ID="lblFirstNameCaption" runat="server" AssociatedControlID="txtFirstName" Text="First Name" /> |
---|
| 0 | + | <asp:TextBox ID="txtFirstName" runat="server" /> |
---|
| 0 | + | <asp:Label ID="lblLastNameCaption" runat="server" AssociatedControlID="txtLastName" Text="Last Name" /> |
---|
| 0 | + | <asp:TextBox ID="txtLastName" runat="server" /> |
---|
| 0 | + | <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> |
---|
| 0 | + | <asp:LinkButton ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" /> |
---|
| 0 | + | </div> |
---|
| 0 | + | <script type="text/javascript"> |
---|
| 0 | + | $(function() { |
---|
| 0 | + | $('#<%= ctlAddContact.ClientID %>').click(function(e) { |
---|
| 0 | + | e.preventDefault(); |
---|
| 0 | + | $.blockUI({message: $('#ctlAddContactModal')}); |
---|
| 0 | + | }); |
---|
| 0 | + | $('#<%= btnCancel.ClientID %>').click(function(e) { |
---|
| 0 | + | $.unblockUI(); |
---|
| 0 | + | }); |
---|
| 0 | + | var btnSaveId = '<%= btnSave.ClientID %>'; |
---|
| 0 | + | $('#' + btnSaveId).click(function(e) { |
---|
| 0 | + | e.preventDefault(); |
---|
| 0 | + | $.unblockUI({onUnblock: function() { eval($('#' + btnSaveId).attr('href')); } }); |
---|
| 0 | + | }); |
---|
| 0 | + | }); |
---|
| 0 | + | </script> |
---|
| 0 | + | </form> |
---|
| 0 | + | </body> |
---|
| 0 | + | </html> |
---|
... | |
---|