Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 350021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:30:45+00:00 2026-05-12T11:30:45+00:00

Asp.Net 3.5 / WebForms (no ajax) I am trying to update a delete confirm

  • 0

Asp.Net 3.5 / WebForms (no ajax)

I am trying to update a delete confirm box with jquery & UIBlock. Old code looks something like this…

<asp:LinkButton OnClientClick="return confirm('Are you sure you want to delete?')" runat="server" ID="DeleteButton" OnClick="DeleteButton_OnClick">Delete</asp:LinkButton>

What is the best practice to postpone and then continue a postback with jquery & asp.net? I haven’t found a clean way/example/guidance on this. Dave Ward (encosia.com) has some examples w/ UIBlock but none of them uses UIBlock as a confirmation / modal popup.

Thanks for any help/pointers.

Answer

<a href="#" id="delete">
  <span>Delete?</span>
</a>

<div id="question" style="display:none; cursor: default"> 
        <h1>Are you sure you want to delete?</h1> 
        <asp:LinkButton runat="server" Text="Yes" OnClick="DeleteButton_OnClick"></asp:LinkButton>
        <a href="#" id="no"><span>No</span></a>
</div> 


<script type="text/javascript">
    $(document).ready(function() {

      $('#delete').click(function(ev) {
        ev.preventDefault();
        $.blockUI({ message: $('#question'), css: { width: '275px'} });
      });

      $('#no').click(function() {
        $.unblockUI();
        return false;
      });

    }); 
</script> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:30:45+00:00Added an answer on May 12, 2026 at 11:30 am

    You can do something like this :

    $('#DeleteButton').bind('click', function() {
    
       // if confirmation button inside the form is pressed ..
       $('#confirm_button').bind('click', function() {
        // redirect to the page where it resolves the request       
            window.location = "http://www.site.com/?delete";
            // or use ajax call
        $.ajax({
            // the request to delete 
        });
            // this one in case you choose to make ajax request
        $.unblockUI();
       });
    
       $.blockUI({
            // form setted with display:none; in css to be trigged when delete button is clicked
            // css here is an example
        message: $('#delete_form'),
        css: { 
            border: 'none', 
            padding: '15px',
            width: '400px',
            backgroundColor: '#000', 
            '-webkit-border-radius': '10px', 
            '-moz-border-radius': '10px',
            color: '#fff' 
            }
        });
    
            // cancel button inside the form, when clicked, dismiss form 
        $('#cancel').click($.unblockUI);
            // if user clicks outside the form, it dismisses the form as well
        $('.blockOverlay').click($.unblockUI); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make use of jQueryUI AJAX tabs in my ASP.Net Webforms
Trying to optimize one web project. It uses asp.net (webforms), bunch of jquery plugins
I am building a asp.net webforms (3.5 sp1) application, using jquery where I can
Having been primarily a server-side programmer(ASP.NET WebForms) I'm trying to get my mind wrapped
I'm trying to implement a client-side ajax login on Asp.Net MVC. I used to
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
I'm writing a custom control in ASP.Net 3.5 WebForms, using ASP.Net AJAX. I'm building
Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a
In ASP.net Webforms how do you detect which Textbox someone pressed enter? Please no
I have an ASP.NET webforms application with a Menu control. How does one hide

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.