Code Snippet Revision 666435636337 (Thu Sep 15 2011 at 14:16) - Diff Link to this snippet: https://friendpaste.com/4q8dl7sa1yRliSzFVvvDc1 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021222324252627282930313233343536373839<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CodeSnippet.aspx.cs" Inherits="Playground.CodeSnippet" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head id="ctlHead" runat="server"> <title>Playground</title> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="jquery.blockUI.js" type="text/javascript"></script></head><body> <form id="ctlForm" runat="server"> <asp:Button id="ctlAddContact" runat="server" Text="Add Contact" /> <div id="ctlAddContactModal" style="display: none;"> <h3>Add Contact</h3> <asp:Label ID="lblFirstNameCaption" runat="server" AssociatedControlID="txtFirstName" Text="First Name" /> <asp:TextBox ID="txtFirstName" runat="server" /> <asp:Label ID="lblLastNameCaption" runat="server" AssociatedControlID="txtLastName" Text="Last Name" /> <asp:TextBox ID="txtLastName" runat="server" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> <asp:LinkButton ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" /> </div> <script type="text/javascript"> $(function() { $('#<%= ctlAddContact.ClientID %>').click(function(e) { e.preventDefault(); $.blockUI({message: $('#ctlAddContactModal')}); }); $('#<%= btnCancel.ClientID %>').click(function(e) { $.unblockUI(); }); var btnSaveId = '<%= btnSave.ClientID %>'; $('#' + btnSaveId).click(function(e) { e.preventDefault(); $.unblockUI({onUnblock: function() { eval($('#' + btnSaveId).attr('href')); } }); }); }); </script> </form></body></html>