שינוי שם אובייקט שמגיע מה-SESSION
I have a file upload control (using asp.net 2.0) and when a file choosen (with the browser button) i change the name of the file to the parameter that the session hold (id) with help from a new button
(I wrote under Button1_Click event
FileUpload fileUpload = (FileUpload)DetailsView_Product.FindControl("FileUpload1");
fileUpload.PostedFile.SaveAs(@"F:worksCatalogueImagespic" + Session["Product_Id"].ToString() + ".jpg");
and it went well, i have a new file call pic18.jpg in folder:Images (session=18)
so, the problem is: I want to save the picture also in my data base in the fit row of the product (acctually the address of the picture) so i wrot:
(under <asp:AccessDataSource )
UpdateCommand="UPDATE [products] Set [product_name]=?, [brief]=?, [picture]=? WHERE [product_id]=?"
The ‘?’ is for the session values///
Now, it save the picture in data base justlike that: "18"
What should i write ther so i can get "pic18.jpg" ?
Thanks so much