<script type="text/javascript"> function savePhoto() { var data = embed.toDataURL(); var title = $("#title").val(); $.ajax({ type: "POST", url: "Security_GatePass.aspx", data: 'data1=data', }).done(function (o) { alert("Photo Saved Successfully!"); }); } script>
i can capture image by this but i can't save the captured image in database..
i tried like this codebihind..
String source = Request.Form["photo"];
source =source.Substring(source.IndexOf(",") + 1);
byte[] photo =Convert.FromBase64String(source);
photoParam.Value = photo;
Line 55: String source = Request.Form["photo"]; Line 56: // remove extra chars at the beginning Line 57: source = source.Substring(source.IndexOf(",") + 1); Line 58: byte[] photo = Convert.FromBase64String(source); Line 59: photoParam.Value = photo;
Object reference not set to an instance of an object. to Line 57.
But its not working..
plz help me
thank you in advance
Dinkar VeerPosted Mar 20, 2017, 5:44 AM
Ramesh PalanivelPosted Mar 20, 2017, 5:40 AM