Front desk jsfunction onsavebarcodetitle () { if (document.getelementbyidx_x ("Path1"). Value! = "") { var MPDF417Text = pdf417text.value; var mtitle = mpdf417text.split ("^"); $.post ("Pdf417.ashx?action=savecarcode", {Barcode_File:document.getElementByIdx_x ("Path1"). Value, Barcodedescript:mtitle[6], r:math.random ()}, function (data) { data = Eval_r (data); }, "JSON"); alert ("saved successfully"); } else { alert ("Get Picture Path ' Operation First"); } } post: Request type pdf417.ashx?action=savecarcode: General handler? action= Key--In the general processing program to face the corresponding method Barcode_file corresponding stream ctx.request["Barcode_file"] General handler public void ProcessRequest (HttpContext context) { context. Response.ContentType = "Text/plain"; if (context. Request["action"] = = "GetPDF417") { getpdf417 (); } else if (context. Request["action"] = = "Savecarcode") { savecarcode (); } context. Response.Flush (); context. Response.End (); } private int Msavecarcode (string barcode_file, String barcodedescript) { sqlparameter[] para ={new SqlParameter ("@BarCodeImage", Barcode_file), & nbSp; new SqlParameter ("@BarCodeDescript", Barcodedescript)}; int result = MGear.Projects.Utility.SqlHelper.ExecuteNonQuery (conn, CommandType.StoredProcedure, "dbo. Createbsarcode ", para); return result; }
Ajax POST Request instance