Could asp.net create files on client machine?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AMPrasad
    New Member
    • Jul 2014
    • 1

    Could asp.net create files on client machine?

    Does it have any ways that asp.net web application can create the file on
    client computer or
    get files from client computer?

    Thanks.
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    yes - typically these things are accomplished using Active X controls. Not sure if Active X has been replaced by another technology since it's been around for quite some time

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      In this post I explain how to retrieve an image from the server computer and write it into the response's output stream so that it is sent to the browser.

      All you have to do is change the Response.Conten tType = "image/jpg" to match the type of content you are sending down to the browser.

      Once the content is sent to the browser the browser will attempt to open it in a plugin that can open the file. If there is no plugin that matches the ContentType that you sent, it will open a dialog that lets the user save the file to their computer or cancel the action.

      If you want to force the item to be downloaded (not opened by the browser) you can specify the type "applicatio n" as the ContentType and the browser will not have a matching plugin.

      You may want to rename the aspx file to something other than "Thumbnail" as well.
      Last edited by Frinavale; Nov 3 '14, 02:30 PM.

      Comment

      Working...