Upload Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerin
    New Member
    • Sep 2007
    • 9

    #1

    Upload Files

    Hi,
    How can i upload & retrive files using asp.net.Plz mention some simple samples.
    Thanks
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by jerin
    Hi,
    How can i upload & retrive files using asp.net.Plz mention some simple samples.
    Thanks
    Hi Jerin,

    I've noticed that you have been asking a lot of questions that are easily answered by a textbook or simple google searches.

    The best resource for getting started with .NET is the MSDN library.
    Please see the MSDN library for their article on the FileUpload Class. It fully describes the FileUpload control and gives examples on how to use it.

    Once you have attempted to use the control and have run into a problem, please post your problem here on theScripts and we'll help you figure it out.

    In other words, please research your problem before asking for help. The MSDN library is one of the best places to research problems concerning .NET. We're here to help you with any problems that you encounter but expect that you attempt to solve the problem before asking.

    Cheers

    -Moderator Frinny

    Comment

    • hareen
      New Member
      • Dec 2007
      • 4

      #3
      in ASP .NET 2.0 u have a File Upload Control by using this control u can easily upload files.


      assume FileUpload1 is ur FileUpload Control name
      Code:
      if(FileUpload1.HasFile)
      {
               // if the FileUpload Control Has File
                FileUpload1.SaveAs(Path);   //Saves the Selected File In Given Path
                                                         //it Only Accepts Physical Path not Absolute path
      }
      To Retrive File

      give the Physical path of a file to hyper link Navigate Url
      Last edited by Frinavale; Dec 20 '07, 02:02 PM. Reason: Fixed Code Tag

      Comment

      Working...