Getting File Path in Browse File Dialog in ASP.Net

Discussion in 'ASP .Net' started by =?Utf-8?B?ZGVuIDIwMDU=?=, May 5, 2006.

  1. Hi everybody,

    I like to allow user to select and browse to which location to save the
    pdf file of a crystal report viewed on a web page, how can i do this in
    ASP.Net? I need to get the path selected from dialog box. Thanks.

    Note: Using VS 2002


    den2005
    --
    MCP Year 2005, Philippines
     
    =?Utf-8?B?ZGVuIDIwMDU=?=, May 5, 2006
    #1
    1. Advertising

  2. You are talking about a path on the server?

    You can use server.mappath and create a mechanism that pulls a tree up and
    down from that position, but it is far better to give them set locations,
    even if it includes making a new directory. There are a couple of reasons
    this is true:

    Security - when you open up the directory access to the web, a hacker can
    traverse your system and takeover. IIS 6 will try to help you in this
    regard, but allowing a user unfettered access to save locations requires
    turing this feature off.

    Security - you are exposing the layout of your application and the server

    Performance - either you gather a bunch of info and present up front or you
    have a lot of trips back to the server.
    --
    Gregory A. Beamer

    *************************************************
    Think Outside the Box!
    *************************************************
    "den 2005" <> wrote in message
    news:...
    > Hi everybody,
    >
    > I like to allow user to select and browse to which location to save the
    > pdf file of a crystal report viewed on a web page, how can i do this in
    > ASP.Net? I need to get the path selected from dialog box. Thanks.
    >
    > Note: Using VS 2002
    >
    >
    > den2005
    > --
    > MCP Year 2005, Philippines
     
    Cowboy \(Gregory A. Beamer\), May 5, 2006
    #2
    1. Advertising

  3. HI Gregory,

    Thanks for the reply. That is the requirement, to save the crystal report
    as pdf file in the local pc folder location chosen by user like downloading a
    file from the web. I need to get the selected path and save the crystal
    report as pdf file on that path. So, How is this done??


    dennis

    --
    MCP Year 2005, Philippines


    "Cowboy (Gregory A. Beamer)" wrote:

    > You are talking about a path on the server?
    >
    > You can use server.mappath and create a mechanism that pulls a tree up and
    > down from that position, but it is far better to give them set locations,
    > even if it includes making a new directory. There are a couple of reasons
    > this is true:
    >
    > Security - when you open up the directory access to the web, a hacker can
    > traverse your system and takeover. IIS 6 will try to help you in this
    > regard, but allowing a user unfettered access to save locations requires
    > turing this feature off.
    >
    > Security - you are exposing the layout of your application and the server
    >
    > Performance - either you gather a bunch of info and present up front or you
    > have a lot of trips back to the server.
    > --
    > Gregory A. Beamer
    >
    > *************************************************
    > Think Outside the Box!
    > *************************************************
    > "den 2005" <> wrote in message
    > news:...
    > > Hi everybody,
    > >
    > > I like to allow user to select and browse to which location to save the
    > > pdf file of a crystal report viewed on a web page, how can i do this in
    > > ASP.Net? I need to get the path selected from dialog box. Thanks.
    > >
    > > Note: Using VS 2002
    > >
    > >
    > > den2005
    > > --
    > > MCP Year 2005, Philippines

    >
    >
    >
     
    =?Utf-8?B?ZGVuIDIwMDU=?=, May 8, 2006
    #3
  4. This problem has been resolved using FileStream and Response.BinaryWrite().

    den2005
    --
    MCP Year 2005, Philippines


    "den 2005" wrote:

    > HI Gregory,
    >
    > Thanks for the reply. That is the requirement, to save the crystal report
    > as pdf file in the local pc folder location chosen by user like downloading a
    > file from the web. I need to get the selected path and save the crystal
    > report as pdf file on that path. So, How is this done??
    >
    >
    > dennis
    >
    > --
    > MCP Year 2005, Philippines
    >
    >
    > "Cowboy (Gregory A. Beamer)" wrote:
    >
    > > You are talking about a path on the server?
    > >
    > > You can use server.mappath and create a mechanism that pulls a tree up and
    > > down from that position, but it is far better to give them set locations,
    > > even if it includes making a new directory. There are a couple of reasons
    > > this is true:
    > >
    > > Security - when you open up the directory access to the web, a hacker can
    > > traverse your system and takeover. IIS 6 will try to help you in this
    > > regard, but allowing a user unfettered access to save locations requires
    > > turing this feature off.
    > >
    > > Security - you are exposing the layout of your application and the server
    > >
    > > Performance - either you gather a bunch of info and present up front or you
    > > have a lot of trips back to the server.
    > > --
    > > Gregory A. Beamer
    > >
    > > *************************************************
    > > Think Outside the Box!
    > > *************************************************
    > > "den 2005" <> wrote in message
    > > news:...
    > > > Hi everybody,
    > > >
    > > > I like to allow user to select and browse to which location to save the
    > > > pdf file of a crystal report viewed on a web page, how can i do this in
    > > > ASP.Net? I need to get the path selected from dialog box. Thanks.
    > > >
    > > > Note: Using VS 2002
    > > >
    > > >
    > > > den2005
    > > > --
    > > > MCP Year 2005, Philippines

    > >
    > >
    > >
     
    =?Utf-8?B?ZGVuIDIwMDU=?=, May 8, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anita C

    Browse File dialog

    Anita C, Nov 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,955
    Anita C
    Dec 1, 2003
  2. DMG
    Replies:
    4
    Views:
    1,057
  3. Jen
    Replies:
    4
    Views:
    268
    Alessandro Zifiglio
    Feb 12, 2004
  4. John Jebastin

    browse for folder dialog in ASP

    John Jebastin, Mar 7, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    290
    Steve C. Orr [MVP, MCSD]
    Mar 7, 2005
  5. Replies:
    0
    Views:
    244
Loading...

Share This Page