Announcement

Collapse
No announcement yet.

Ajax Help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Ajax Help

    Hi, I am trying to convert the following code from Javascript to C#. I can't figure out how to write an Ajax call using C#. Here is the javascript:

    function testing2() {
    $("#addButton").click( function () {
    $.ajax("/api/demo/add", {
    type: "GET",
    data: { value1: $("#firstNumber").val(), value2: $("#secondNumber").val() },
    success: function (data) { $("#responseMessage").html(data); },
    error: function (jqXHR) { $("#responseMessage").html(jqXHR.statusText + " " + jqXHR.status);
    }
    });
    });
    }

    Attached Files
    Last edited by jeremiahsuess; 2017-08-16 @ 12:52 PM.

    #2
    Hi jeremiahsuess,

    Welcome to Bridge!

    I think the following Deck sample should help:

    https://deck.net/webservice

    Comment

    Working...
    X