Click here to Skip to main content
See more: C#4.0
string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
 
fileuploadimages.SaveAs(Server.MapPath("Images/" + filename));
 
SqlCommand cmd = new SqlCommand("Insert into ImagesPath(ImageName,ImagePath) values(@ImageName,@ImagePath)", con);
            
 
            cmd.Parameters.AddWithValue("@ImageName", filename);
 
            cmd.Parameters.AddWithValue("@ImagePath", "Images/" + filename);
 
            cmd.ExecuteNonQuery();
Closed because The post is not clear, or is incomplete and has not been phrased in a way that allows it to be fully understood.. Reported by Sergey Alexandrovich Kryukov, __TR__, Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ), ProgramFOX on Wednesday, February 27, 2013 7:14pm.
Posted 24-Dec-12 4:36am
Edited 24-Dec-12 4:40am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 428
1 CHill60 310
2 BillWoodruff 183
3 DamithSL 163
4 OriginalGriff 163


Advertise | Privacy | Mobile
Web01 | 2.8.141022.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100