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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:56:49+00:00 2026-05-24T10:56:49+00:00

I am using asp.net post back method to send data from jQuery MessageBox to

  • 0

I am using asp.net post back method to send data from jQuery MessageBox to server. Is this correct way to send data to server without refreshing whole web page? What would be other alternatives?

default.aspx client code

function confirmDelete(id) {
    var msg = 'Are you sure you want to delete user?';

    $.msgbox(msg, {
        type: "confirm",
        buttons: [
                { type: "submit", value: "Yes" },
                { type: "submit", value: "No" }
                ]
    },
    function (res) {
        var answ = res;
        if (answ == 'Yes') {
            __doPostBack('<%=upPanel.UniqueID%>$Delete', id);
        }
    });
    return false;
}

default.aspx.cs server code

protected void Page_Load(object sender, EventArgs e)
{

    if (IsPostBack && !IsCallback)
                {
                    var sourceId = Request.Form.Get(postEventSourceID);
                    var argumentId = Request.Form.Get(postEventArgumentID);
                    if (sourceId.Contains("Delete"))
                    {
                        var id = Helpers.GetInt(argumentId);
                        DeleteUser(id);
                    }
                }

}
  • 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-24T10:56:49+00:00Added an answer on May 24, 2026 at 10:56 am

    You should use jquery ajax to partially refresh the page. __doPostBack will submit the form and refresh the whole page.

    $.ajax({
       url: "urlOfThePage",
       data: {},
       success: function(response){
       }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET application in which i want to post data using jQuery
I'm building an asp.net page that uses a page method call from jquery. This
I'm using jQuery to post to an ASP .NET Web Service to implement a
I'm using jQuery to make an Ajax call using an Http Post in ASP.NET
I'm fetching JSON from my ASP .NET website using the following jQuery: $.ajax({ type:
I'm using HttpWebRequest to POST data to an ASP.NET webpage (currently running on the
I am looking at ASP.NET MVC2 and trying to post a complex object using
Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a
When applying the MVP pattern to ASP.NET applications, where does using AJAX to post
ASP.NET 4.0 Need some help with this vexing HTTP POST problem - I have

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.