asp.net 2.0 - How to work with FileUpload in a WebPage? -
asp.net 2.0 - How to work with FileUpload in a WebPage? -
i have follow code in asp.net webpage:
protected void btnsend_click(object sender, eventargs e) { string imei = request.querystring["id"]; int imeiid = int.parse(imei); if (fupicture.hasfile) { fupicture.saveas("/images/" + imei + ".jpg"); dal.imeihandling.savepicture(imeiid, ""); } string code = request.querystring["code"]; response.redirect("~/uploadpicture.aspx?id=" + imei + "&code=" + code); }
how fill saveas , how load path in asp:image ?
save takes file path, typically this.
fleupload.saveas(server.mappath("~/images/uploadded/new.jpg"))
or similar, physical file path save.
once saved, can whatever want it.
note: want consider security/validation user provided image etc when doing this.
asp.net-2.0
Comments
Post a Comment