Want to build the ChatGPT based Apps? Start here
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Abdalla Elawad
1.2k
1k
186.7k
how can i save image in folder on server
Jan 19 2020 2:01 PM
hi guys
please support me , i am facing problem when i started my project in my localhost its saving okay but when i transfer this project on my another server to publish this system i cant not save any image .
this is code
string str = FileUpload1.FileName;
//string str2 = FileUpload2.FileName;
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/Images/" + str));
//FileUpload2.PostedFile.SaveAs(Server.MapPath("~/Images/" + str2));
string IqamaCopy = "~/Images/" + str.ToString();
// string IqamaCopy = "~/Images/" + str2.ToString();
SqlCommand cmd = new SqlCommand("Visitor_Insert", Conn);
cmd.Parameters.Add("@IqamaIdNo", SqlDbType.NVarChar).Value = txtIdIqama.Text.Trim();
cmd.Parameters.Add("@Reason", SqlDbType.NVarChar).Value = txtarea.Value.Trim();
//cmd.Parameters.AddWithValue("@PassportCopy", PassportCopy);
cmd.Parameters.AddWithValue("@IqamaCopy", IqamaCopy);
Reply
Answers (
2
)
How To Close A Popup Window when user clicks on hyperlink
How to find out which windows process is using a file?