Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: object does not contains method or property

0
0
Hi furesoft,

You probably intended to define your function like this:
function WebClient() {
    this.DownloadString = function (path, callback) {
        var wc = new System.Net.WebClient();
        var result = wc.DownloadString(path);
        if (typeof(callback) != 'undefined') {
            callback(result);
        }
        return result;
    };
}
Cheers!

Viewing all articles
Browse latest Browse all 2297