469,909 Members | 1,870 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

Getting File Path in Browse File Dialog in ASP.Net

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
May 5 '06 #1
3 5266
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" <de*****@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
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

May 5 '06 #2
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" <de*****@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
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


May 8 '06 #3
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" <de*****@discussions.microsoft.com> wrote in message
news:F8**********************************@microsof t.com...
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


May 8 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dan | last post: by
3 posts views Thread by Highlander | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.