Full width home advertisement

Post Page Advertisement [Top]

File Upload:-
1.Create a webform fileupload (you can give any name of webform)
2.Take a Fileupload Tool.
3.Also take a button.
4.right click on solution explorer and create a folder name of Image
It will look like this















Double Click on button.
And write this code .
 if (FileUpload1.HasFile)
        {
            
           
                string file = FileUpload1.FileName;
                string path = (Server.MapPath("Image"));
                string fullpath = path + "\\" + FileUpload1.FileName;
                FileUpload1.SaveAs(fullpath);
              
            }
It will also store in data base just follow few steps create a database and take a field id,and image
..

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib