asp.net load pictures from a folder to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chriskaza81
    New Member
    • Nov 2007
    • 52

    asp.net load pictures from a folder to database

    i need to do : select a spesific folder wich contains pictures and then load them in the database reading them one by one . any code example how can i do that ?????
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by chriskaza81
    i need to do : select a spesific folder wich contains pictures and then load them in the database reading them one by one . any code example how can i do that ?????
    Which database are you using? Googling BLOB is a good starting point.

    Comment

    • Curtis Rutland
      Recognized Expert Specialist
      • Apr 2008
      • 3264

      #3
      You will need to use System.IO in your program.
      Code:
      'vb
      Imports System.IO
      //c#
      using System.IO;
      The object you want is DirectoryInfo. Using this you can get a list of files in a directory. You can even get a filtered list (only images). Look up DirectoryInfo and FileInfo on how to do this, try it, and let us know if you need more help for this part.

      Comment

      • chriskaza81
        New Member
        • Nov 2007
        • 52

        #4
        OK i used system.io .... thanks for help

        Comment

        • sscoggins
          New Member
          • Feb 2009
          • 2

          #5
          Same thing

          Hey,
          could you show me a little of how you did this load, I'm trying to make a folderbrowserdi alog that will load two jpg's from a sub-folder of the folder I select.
          I'm using 2008 C#.

          Thanks,
          Noob Coder.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Did you take a look at the System.IO Namespace?
            You'll be interested in using the File Class, the Directory Class, and maybe the DirectoryInfo Class to solve your problem.

            -Frinny

            Comment

            • sscoggins
              New Member
              • Feb 2009
              • 2

              #7
              I have it now

              I figured it out. Thanks

              Comment

              Working...