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. Saving Files From SQL to a Specific Folder without Prompt

Saving Files From SQL to a Specific Folder without Prompt

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasesql-server
6 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.
  • I Offline
    I Offline
    i i i
    wrote on last edited by
    #1

    Thanks in advance, Back End : SQL Server 2012 Front End : ASP.net 4.0 My question is can we save files to a specified folder from ASP.net in a specific folder (C:\Download). Right now browser prompts the dialogue box that do you want to save or open and if user saves it saves that file to the user's download folder,So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder any suggestion ?

    SOFTDEV Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

    S B Richard DeemingR 3 Replies Last reply
    0
    • I i i i

      Thanks in advance, Back End : SQL Server 2012 Front End : ASP.net 4.0 My question is can we save files to a specified folder from ASP.net in a specific folder (C:\Download). Right now browser prompts the dialogue box that do you want to save or open and if user saves it saves that file to the user's download folder,So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder any suggestion ?

      SOFTDEV Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

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

      εїзεїзεїз wrote:

      can we save files to a specified folder from ASP.net in a specific folder (C:\Download).

      Yes.

      εїзεїзεїз wrote:

      So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder

      You can use WebClient class to do it. Following discussion will help: want to suppress filedownload dialog box [^]

      Sandeep Mewara Microsoft ASP.NET MVP 2012 [My Latest Article(s)]: How to extend a WPF Textbox to Custom Picker Server side Delimiters in ASP.NET

      I 1 Reply Last reply
      0
      • I i i i

        Thanks in advance, Back End : SQL Server 2012 Front End : ASP.net 4.0 My question is can we save files to a specified folder from ASP.net in a specific folder (C:\Download). Right now browser prompts the dialogue box that do you want to save or open and if user saves it saves that file to the user's download folder,So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder any suggestion ?

        SOFTDEV Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        As with many people asking questions related to the web here on CP, also you ought to learn to differentiate where what happens! ASP.Net runs on the web server. That is normally not the machine where the user looks at your web pages in a browser - though many developers do both things on the same one computer. The "save file dialog" is opened by the browser on the client - that is not an ASP.Net function. If a web page wants to write some files onto my hard disk without asking me for permission, I would not trust it: I'd think of malware. Yes, there are security holes in many browsers allowing for such bad things, and they ought to get fixed as soon as possible.

        1 Reply Last reply
        0
        • S Sandeep Mewara

          εїзεїзεїз wrote:

          can we save files to a specified folder from ASP.net in a specific folder (C:\Download).

          Yes.

          εїзεїзεїз wrote:

          So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder

          You can use WebClient class to do it. Following discussion will help: want to suppress filedownload dialog box [^]

          Sandeep Mewara Microsoft ASP.NET MVP 2012 [My Latest Article(s)]: How to extend a WPF Textbox to Custom Picker Server side Delimiters in ASP.NET

          I Offline
          I Offline
          i i i
          wrote on last edited by
          #4

          Thanks for the post, i had changed response.addheader from attachment to inline and its not asking for and message and saving to specific folder i will go through the link

          SOFTDEV Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

          1 Reply Last reply
          0
          • I i i i

            Thanks in advance, Back End : SQL Server 2012 Front End : ASP.net 4.0 My question is can we save files to a specified folder from ASP.net in a specific folder (C:\Download). Right now browser prompts the dialogue box that do you want to save or open and if user saves it saves that file to the user's download folder,So is there a way that it does not prompts/Show download dialogue box and will save file to desired folder any suggestion ?

            SOFTDEV Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

            Richard DeemingR Offline
            Richard DeemingR Offline
            Richard Deeming
            wrote on last edited by
            #5

            εїзεїзεїз wrote:

            is there a way that it does not prompts/Show download dialogue box and will save file to desired folder

            No. If there was any way for the server to force the browser to save a file to a particular folder without prompting the user, that would be a massive security risk.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

            I 1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              εїзεїзεїз wrote:

              is there a way that it does not prompts/Show download dialogue box and will save file to desired folder

              No. If there was any way for the server to force the browser to save a file to a particular folder without prompting the user, that would be a massive security risk.


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              I Offline
              I Offline
              i i i
              wrote on last edited by
              #6

              Yes, I do agree

              To kill a DEER, You need Guns, knives, Ropes and many people to help But To kill a DEAR, You need just ignorance and silence

              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