You must Sign In to post a response.
  • Category: .NET

    "please help me", "I have a problem"

    The forum thread has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this thread.
    This thread will be reviewed shortly.
    If you think this thread contain inappropriate content, please report to webmaster.
    My program is : Register for study so I want the student register for study with their information like : name ,last name ,sex ,date of birth, age ,........., and photo so the code for the student can attach a photo to show ,,that i would like to know the code for the photo could you help me
  • #764707
    Make on temp folder in that, save the photo and show the photo from that folder with uploaded name then you delete

    string fn = System.IO.Path.GetFileName(File1.PostedFile.FileName);
    string SaveLocation = Server.MapPath("Data") + "\\" + fn;


    If you want to delete
    delete the file

  • #766535

    Kindly go through the following Links. It May helps you lot to do your Requirement.



    In that Links they have explained Lot.


  • #770079
    You can use photoupload or file upload control from .net framework that should solve your problem.

    or you can use the following code

    On button click event you can load an image by creating an object of Image class like

    Image img=Image.FromFile("path of file"); or you can take the path of file from the file upload control.

    And then load it by using image property of PictureBox like

    PictureBox.Image =img;

    After that, I guess you want to save that image to another location for that you can use Copy method of File class like


    Thanks and Regards
    Miss Meetu Choudhary (Site Coordinator)
    Go Green Save Green

  • Sign In to post your comments