Click here to Skip to main content
15,905,010 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have four filed for upadating.... Name, UserImage, Address and DOB
For UserImage Uploding, i am using Fileupload controls......but sometimes when we
are not selecting userimage for uploading then it's updating null value in database.
So, i want to how mentain the previous image..if user is not updating the image.
Posted
Comments
Deenuji 6-Dec-12 1:18am    
1st u make changes in database....u dont allow null values in database...then try....

<updated answer="">
Set a flag saying update = True when user is going to update the fields.
Check for this flag value, if it is True, disable file upload control and while sending updated values to database, do not send the value image. Only send those fields which can be updated.
/xml>
 
Share this answer
 
v2
Comments
Sumit_Kumar_Sinha 6-Dec-12 1:29am    
first time use upload thier image.....but second they not want to change the image...only they want to chagne other fileds...........
Vani Kulkarni 6-Dec-12 1:35am    
Updated answer.
Sumit_Kumar_Sinha 6-Dec-12 1:39am    
but in stored procedure i define the all fileds.........it creates any problem....
after make the changes....writing the validation process for file upload control....

After that try both link...

ASP.NET File Upload with Progress Bar[^]


http://msdn.microsoft.com/en-us/library/aa479405.aspx[^]
 
Share this answer
 
how to upload video in asp.net
 
Share this answer
 
Comments
Surendra0x2 6-Dec-12 2:35am    
Check this Link-
http://www.codeproject.com/Answers/501141/videoplusUploadplusandplusviewplusinplusasp-netplu#answer2
On Page lOad fetch UserPic on behalf of session and store in Viewstate
and on Update button click check if Fileupload1.contentlength==0
then
insert your previous Fethced Userpic else if Fileupload1.contentlength!=0 then update selected file :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900