Click here to Skip to main content
15,894,955 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi,i have i imagebutton control with a default image on it.what i want that when i click on that imagebutton i file should be uploaded in database from our computer and should be saved on the database,and also should be seen in that imagebutton.for that i have written code as
"insert into uploadfile values (@userid,@file).this is code not giving me any error but i dont know that really my file is being saved in the database, also
i have used table datatype as 'varchar' for userid and 'image' for file
but i am not able to retrive that image and show in the imagebutton.
i am writing the code as

"select images from tablename where userid=@id"
while(dr.read())
{
imgbtn=dr["images"];
}

i have also used fileupload control.
atually my idea is to make a facebook like project.also user can upload as many as file please help give me a code which i can understand easily .
Posted

1 solution

A quick search gave these two articles. See if it helps:

Article 1[^]

Article 2[^]
 
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