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 9202439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:15:32+00:00 2026-06-17T23:15:32+00:00

I’m using ASP.Net MVC to make my app I’m actually trying to delete an

  • 0

I’m using ASP.Net MVC to make my app

I’m actually trying to delete an entry from my DB, first i must have a confirmation message and when the action is completed i want to refresh my PartialView

here’s my code

          <%= Ajax.ActionLink(
            "Supprimer", 
            "Delete", 
            "Users",
            new { item.ID },
            new AjaxOptions {
              Confirm= "confirmMethod",
              UpdateTargetId = "usersListeID",
              OnSuccess = "success"
           }
              )%>

The problem is the confirm option is a simple ajax message, i want to use my own message (well structured because I used ajax & jQuery to make it)

function confirmMethod() {
$.msgBox({
    title: "Demande de confirmation",
    content: "Voulez-vous effectuer cette action?",
    type: "confirm",
    buttons: [{ value: "Oui" }, { value: "Non"}],
    success: function (result) {
        if (result == "Non") {
            abort();
        }
    }
});}
  • 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-06-17T23:15:34+00:00Added an answer on June 17, 2026 at 11:15 pm

    You could use a standard Html.ActionLink:

    <%= Ajax.ActionLink(
        "Supprimer", 
        "Delete", 
        "Users",
        new { item.ID },
        new { @class = "delete" }
    ) %>
    

    and then use jQuery to subscribe to the .click() event of tis anchor:

    $(function() {
        $('.delete').click(function() {
            var anchor = this;
            // Show the confirmation dialog
            $.msgBox({
                title: "Demande de confirmation",
                content: "Voulez-vous effectuer cette action?",
                type: "confirm",
                buttons: [{ value: "Oui" }, { value: "Non"}],
                success: function (result) {
                    if (result == "Oui") {
                        // send the AJAX request if the user selected "Oui":
                        $.ajax({
                            url: anchor.href,
                            type: 'POST',
                            success: function(data) {
                                // When the AJAX request succeeds update the 
                                // corresponding element in your DOM
                                $('#usersListeID').html(data);
                            }
                        });
                    }
                }
            });
    
            // Always cancel the default action of the link
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a view passing on information from a database: def serve_article(request, id): served_article
I'm making a simple page using Google Maps API 3. My first. One marker

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.