TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Anant Jain
NA
61
8.3k
save only substring
Sep 21 2015 6:36 AM
save only substring of path in database with asp.net mvc
if (file != null && file.ContentLength > 0)
{
try
{
path = Path.Combine(Server.MapPath("~/Upload"),
Path.GetFileName(file.FileName);
file.SaveAs(path);
tapalmaster.FileUploadPath = Path.GetFileName(file.FileName);
ViewBag.Message = "File uploaded successfully";
byte[] pic = new byte[file.ContentLength];
file.InputStream.Read(pic, 0, file.ContentLength);
}
catch (Exception ex)
{
ViewBag.Message = "ERROR:" + ex.Message.ToString();
}
}
else
{
ViewBag.Message = "You have not specified a file.";
}
Reply
Answers (
0
)
Generating Google Maps markers From Database of GPS in one C
ASP.NET DLL