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
parthiban karnan
NA
549
101.3k
how to upload default image into database
May 9 2013 2:28 AM
i have to insert default image into databse..when no image is selected from fileupload control..
code...not working for inserting default image...
if (FileUpload1.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(
Server
.MapPath("~/UPLOADEDFILES/" + FileName));
feedBack.Attachments.Add(new Attachment(FileUpload1.PostedFile.InputStream, FileName));
}
else
{
string filename="~/images/"+ "sun.gif";
filename.pPropertyImage = filename;
FileUpload1.SaveAs(MapPath(filename));
}
Reply
Answers (
1
)
Problem with the Static Datatable? any help asap pls?
Asp.Net with Ajax