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. OpenFile dialog in a HTML page

OpenFile dialog in a HTML page

Scheduled Pinned Locked Moved Web Development
html
10 Posts 3 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.
  • M Offline
    M Offline
    Madhan Mohan Reddy P
    wrote on last edited by
    #1

    Hi, I have a button on a HTML page. If i click that button I have to invoke "OpenFile" dialog. Could any one assist please.

    S 1 Reply Last reply
    0
    • M Madhan Mohan Reddy P

      Hi, I have a button on a HTML page. If i click that button I have to invoke "OpenFile" dialog. Could any one assist please.

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      Use:

      <input type="file" id="fileDialog" />

      This would give you browse button on click of which Open File dialog would appear.

      Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

      M 2 Replies Last reply
      0
      • S Sandeep Mewara

        Use:

        <input type="file" id="fileDialog" />

        This would give you browse button on click of which Open File dialog would appear.

        Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

        M Offline
        M Offline
        Madhan Mohan Reddy P
        wrote on last edited by
        #3

        Thank you so much ..

        K 1 Reply Last reply
        0
        • S Sandeep Mewara

          Use:

          <input type="file" id="fileDialog" />

          This would give you browse button on click of which Open File dialog would appear.

          Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

          M Offline
          M Offline
          Madhan Mohan Reddy P
          wrote on last edited by
          #4

          Hi Sandeep, Is it posibile to add filters to the openfile dialog box?

          S 1 Reply Last reply
          0
          • M Madhan Mohan Reddy P

            Hi Sandeep, Is it posibile to add filters to the openfile dialog box?

            S Offline
            S Offline
            Sandeep Mewara
            wrote on last edited by
            #5

            Adding accept attribute could work but as W3 says[^], it's not properly handled by recent browsers. Your best bet would be to handle it based on the file extension by yourself at the time of page submit or code behind.

            Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

            M 1 Reply Last reply
            0
            • S Sandeep Mewara

              Adding accept attribute could work but as W3 says[^], it's not properly handled by recent browsers. Your best bet would be to handle it based on the file extension by yourself at the time of page submit or code behind.

              Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

              M Offline
              M Offline
              Madhan Mohan Reddy P
              wrote on last edited by
              #6

              ok thank u.. I will try it out.. once again thank u so much ..

              S 1 Reply Last reply
              0
              • M Madhan Mohan Reddy P

                ok thank u.. I will try it out.. once again thank u so much ..

                S Offline
                S Offline
                Sandeep Mewara
                wrote on last edited by
                #7

                Welcome.

                Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]

                1 Reply Last reply
                0
                • M Madhan Mohan Reddy P

                  Thank you so much ..

                  K Offline
                  K Offline
                  Killzone DeathMan
                  wrote on last edited by
                  #8

                  GOOGLE is your friend, GOOGLE dont hurt you! if you GOOGLE IT you get the answer in a few seconds!

                  M 1 Reply Last reply
                  0
                  • K Killzone DeathMan

                    GOOGLE is your friend, GOOGLE dont hurt you! if you GOOGLE IT you get the answer in a few seconds!

                    M Offline
                    M Offline
                    Madhan Mohan Reddy P
                    wrote on last edited by
                    #9

                    yea got it man .. I don't have access to google but codeproject in my office .. thanks any how..

                    K 1 Reply Last reply
                    0
                    • M Madhan Mohan Reddy P

                      yea got it man .. I don't have access to google but codeproject in my office .. thanks any how..

                      K Offline
                      K Offline
                      Killzone DeathMan
                      wrote on last edited by
                      #10

                      You dont have access to google??? How???

                      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