473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 5384
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Don | last post by:
How do I retrieve the full path (C:\.....filename) of a file uploaded to a php script on the server. I think $_FILES will only provide 'name', which is only the filename itself. Thanks, Don ...
7
by: Martin | last post by:
Again drawing on the groups experience:- 1. For general file opening and file saving, using VB6, are there any issues with using the FileOpen and FileSave Common Dialog Boxes? 2. Is using the...
5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
2
by: Greg | last post by:
looking for an easy way for users to browse for a file on their local drive, and then have access automatically make a copy of that file (files will most likely be images) and save it under a new...
8
by: Salad | last post by:
I designed a small app and I wanted to do a BrowseFolder (see http://www.mvps.org/access/api/api0002.htm), basically do a file open diaglog and select a directory/folder. The problem is that you...
0
by: jmd | last post by:
Hello. I want to write a C# program that does completely automatically what, until now, I do manually, witch is describe below : 1. I launch IE (6) 2. I browse to my desired download page, say...
5
by: Dan | last post by:
I am working on a C# ASP.NET project where I need to allow the user to browse to a folder. The only way I see how to do this is use <input type=file>. But this makes the user select a file and...
18
by: jmd | last post by:
Hello, I posted the following in the C# forum but without one answer. But perhaps now in vb.net someone has some guidelines ! This is my question : I want to write a vb.net program that does...
3
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick() '-- show browse window and Get file path:
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.