You must Sign In to post a response.
  • Category: ASP.Net MVC

    How to disable internet explorer error

    hi all while i am clicking on button below error from internet explorer coming how to not to show this error

    "To display the webpage again, the web browser needs to
    resend the information you've previously submitted".

    my button is:
    <button type="button" data-dismiss="modal" onclick="AcknowledgeOrder('@item.OrderId')"><i></i> @Resources.Resource.txtacknwldge</button>

    my jquery code is

    function AcknowledgeOrder(orderId) {

    type: "POST",
    url: '@Url.RouteUrl("Default", new RouteValueDictionary(new { action = "Acknowledge", controller = "Summary"}), "http", ConfigurationManager.AppSettings["ContextPath"])',
    crossDomain: true,
    data: JSON.stringify({ 'OrderId': orderId}),
    contentType: 'application/json; charset=utf-8',
    success: function(successdata) {
    if (successdata.success) {


    if (!successdata.success) {

    error: function (xhr, status, error) {

  • #769014
    There could be various ways to resolve this type of issues as this is related to the browser where browser sends the POST request again while reloading the page. So you need to prevent this request either by not do the POST request when the page is reloading or write some code which will use the GET rather than POST when reload is happening.
    The simplest way could be to use the same href when reloading as below:

    location.href = location.href;

    The other way could be timeout implementation when reloading.
    You can also remove location.reload and just returned true.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • Sign In to post your comments