Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <script runat="server">
- protected void btnDeleteEvent_Click(object sender, EventArgs e)
- {
- // Do Something
- }
- </script>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>jQuery UI Droppable - Visual feedback</title>
- <link href="_assets/jquery/theme/ui.all.css" rel="stylesheet" type="text/css" />
- <script src="_assets/jquery/jquery-1.3.1.js" type="text/javascript"></script>
- <script src="_assets/jquery/jquery.ui.all.js" type="text/javascript"></script>
- <script type="text/javascript" language="javascript">
- $(document).ready(function() {
- $("#dialog").dialog({
- autoOpen: false,
- height: 140,
- modal: true,
- overlay: {
- backgroundColor: '#000',
- opacity: 0.5
- },
- buttons: {
- 'Delete all items in recycle bin': function() {
- __doPostBack('btnDeleteEvent', '');
- },
- Cancel: function() {
- $(this).dialog('close');
- }
- }
- });
- });
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div id="dialog" title="Empty the recycle bin?">
- <p>
- <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
- These items will be permanently deleted and cannot be recovered. Are you sure?</p>
- </div>
- <input type="button" value="Delete Event" onclick="$('#dialog').dialog('open');" />
- <!-- Let's hide using Text="" the linkButton so we can access it's PostBack in the javascript -->
- <asp:LinkButton ID="btnDeleteEvent" runat="server" Text=""
- onclick="btnDeleteEvent_Click" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement