Lo haria asi: function UploadPic() { var Pic = document.getElementById("colors_sketch").toDataURL("image/png"); Pic = Pic.replace(/^data:image\/(png|jpg);base64,/, "") var usuario = document.getElementById("#id_text_box").value $.ajax({ type: 'POST', url: 'Firma.aspx/UploadPic', data: '{ "imageData" : "' + Pic + '", "Nombre": "usuario" }', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (msg) { alert("Correcto, Imagen Digitalizada Correctamente."); } }); }