Quantcast
Channel: c# equivalent of JavaScript
Viewing all articles
Browse latest Browse all 4

c# equivalent of JavaScript

$
0
0

Hi

What is the c# equivalent of below please?

Thanks

Regards

    this.authenticate = function (username, password, deviceId) {
        var deferred = $.Deferred();
        var authModel = { grant_type: 'password', username: username, password: password, deviceid: deviceId };

        $.ajax({
            type: "POST",
            url: url.concat(path),
            data: 'grant_type=password&username=' + authModel.username + '&password=' + authModel.password,
            model: authModel,
            contentType: "application/x-www-form-urlencoded",
            dataType: 'json',
            success: function (data, status, jqXHR) {
                deferred.resolve();
            },
            error: function (jqXHR, status) {
                deferred.reject();
            }
        });

        return deferred.promise();
    };



Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>