<asp:FileUpload ID="fileuploadreceipt" runat="server" />
[WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static string insertrow(string CMEX_ID, string CMED_ID, string CMET_TYPE_DESC, string CMED_EXP_DT, Int32 CMED_EXP_TYPE, string CMED_EXP_DESC, string CMED_EXP_QTY, string CMED_EXP_RATE, string CMED_EXP_AMT, string CMED_EXP_RCPT_FILE_NAME, string CMED_EXP_COMMENTS, string CMED_EXP_COMP_PAID,string CMED_UPD_USER) { string physicalpath = string.Empty; if (CMED_EXP_RCPT_FILE_NAME != null) { HttpPostedFile fileup = HttpContext.Current.Request.Files["fileuploadreceipt"]; string Ext = Path.GetExtension(Convert.ToString(CMED_EXP_RCPT_FILE_NAME)); string filename = Path.GetFileName(Convert.ToString(CMED_EXP_RCPT_FILE_NAME)); physicalpath = filename.Replace(filename, "") + Guid.NewGuid().ToString() + Ext; fileup.SaveAs(HttpContext.Current.Server.MapPath(physicalpath + "~/Receipts/")); }
httppostedfile
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)