Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. fileupload + filter

fileupload + filter

Scheduled Pinned Locked Moved ASP.NET
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ritu4321
    wrote on last edited by
    #1

    on this control i need only doc and excel files to be seen. that is other files are filtered out.

    R C 2 Replies Last reply
    0
    • R ritu4321

      on this control i need only doc and excel files to be seen. that is other files are filtered out.

      R Offline
      R Offline
      Ravi_21
      wrote on last edited by
      #2

      just take a file uploader control and give the if condition that if the fileuploader.postedfile.extension=".doc" andalso fileuploader.postedfile.extension="xls" then 'ur code else invalid type end if

      1 Reply Last reply
      0
      • R ritu4321

        on this control i need only doc and excel files to be seen. that is other files are filtered out.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        I just answered this, didn't I ? The ASP.NET control is going to render an input type="file", so any attributes that work for that control, will work in the .NET one, they just get passed through.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        R 1 Reply Last reply
        0
        • C Christian Graus

          I just answered this, didn't I ? The ASP.NET control is going to render an input type="file", so any attributes that work for that control, will work in the .NET one, they just get passed through.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          R Offline
          R Offline
          ritu4321
          wrote on last edited by
          #4

          its not working.Please elaborate this . i could not get this.

          N 1 Reply Last reply
          0
          • R ritu4321

            its not working.Please elaborate this . i could not get this.

            N Offline
            N Offline
            N a v a n e e t h
            wrote on last edited by
            #5

            As CG told you can't add filter to the file upload control. You can check the file extension and content type before you save the file to the server. Is this enough for you ?

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups