Post rowversion or timestamp of MsSQL using jquery.txt.txt
  1. /*rowVersion from server*/
  2. var rowVersion = [0, 0, 0, 0, 0, 0, 7, 209];
  3. var json = '';
  4.  
  5. /*rowVersion hepler*/
  6. $.timeStampToBase64String = function(data) {
  7. var str = String.fromCharCode.apply(null, data);
  8. return btoa(str);
  9. };
  10.  
  11. /*this json post would work just fine, at server rowVersion is as..*/
  12. var modifiedPostObj = {
  13. RowVersion: $.timeStampToBase64String(rowVersion)
  14. };
  15. json = JSON.stringify(modifiedPostObj);
  16. alert(json);