This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Makes the call | |
$.ajax({ | |
url: "<SOME URL TO QUERY>", | |
dataType: "json", | |
cache: false | |
}).error(function (jqXHR, textStatus) { | |
}).success(function (data) { | |
// Loop through each returned result | |
for (var key in data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDocItems(id) { | |
$.ajax({ | |
url: "<URL TO GET THE DOCUMENT>?id=" + id, | |
dataType: "json", | |
cache: false | |
}).error(function (jqXHR, textStatus) { | |
}).success(function (data) { | |
for (var key in data) { | |
var html = '<p><a href="<URL TO GET FILE>/GetFile?id=' + data[key].Id + '&type=' + data[key].MimeType + '" >' + data[key].FileName + '</a></p>'; | |
$('#YourElementId').append(html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var id = new Guid(Request["id"]); | |
Repository.DocumentRepository documents = new Repository.DocumentRepository(); | |
var results = documents.GetDocumentItem(id); | |
var f = File(Convert.FromBase64String(results.DocumentBody), Request["type"], results.FileName); | |
return f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: "some url", | |
dataType: "json", | |
cache: false | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
.post { | |
list-style-type: none; | |
} | |
</style> | |
<script src='jquery-1.7.2.min.js'></script> | |
<script src='knockout-2.0.0.js'></script> |
NewerOlder