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
Sai Prasad Anumolu
NA
196
18.9k
I have doubt in File uploading Control 2012?
Mar 13 2014 8:45 AM
First I take File upload control in asp.net and
I upload image and
After Click on Save button ..Data is saving in database + Clear the Data in webpage ... Then - This is First Image
After I upload new image - Data is not Saving in Database ....This is Second image ....
Code is :
if (FileTextAddsUpload.HasFile) ---Frist Time accepting true ..But Send time Saving the image ...It will displaying False
{
string FileName = Path.GetFileName(FileTextAddsUpload.PostedFile.FileName);
string exten = Path.GetExtension(FileName);
if (exten == ".png" || exten == ".PNG" || exten == ".jpg" || exten == ".JPG" || exten == ".jpeg" || exten == ".JPEG" || exten == ".gif" || exten == ".GIF")
{
FileTextAddsUpload.SaveAs(Server.MapPath("~/Images/" + FileName));
con.Open();
id++;
SqlCommand cmd = new SqlCommand("InsertTextAdd_SP", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@TextAddImagePath", "~/Images/" + FileName);
cmd.Parameters.AddWithValue("@MaxCharLength", txtEnterChar.Text);
cmd.Parameters.AddWithValue("@Price", id);
cmd.ExecuteNonQuery();
con.Close();
Imagetextadd.Visible = true;
FileTextAddsUpload.ID = null;
}
ClearControls();
}
Reply
Answers (
2
)
how to use awstats 7.2 winzip file?
2 queations related to Operators Overloading