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 8:14pm.
Posted 24-Dec-12 5:36am
Edited 24-Dec-12 5: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 DamithSL 285
1 Zoltán Zörgő 170
2 OriginalGriff 140
3 Sergey Alexandrovich Kryukov 120
4 Maciej Los 115
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web04 | 2.8.141223.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