473,385 Members | 1,732 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,385 software developers and data experts.

File Dialog to choose a path and file

Hi,
I have a .ASPX page using C# and I need to read in a text file from a
selected path. so in need the file dialog box to allow the user to choose
the path and file that they want to read in.

What command can I use todo this in a .ASPX page, I tried getting it to use
windows that has the file dialog box but cannot get system.window class to
be included in the project.

Thanks,
B Garrett
Nov 19 '05 #1
3 3690
> What command can I use todo this in a .ASPX page, I tried getting it to
use windows that has the file dialog box but cannot get system.window
class to be included in the project.
You don't want to mix up Windows Forms and ASP.;Net web pages; they are
entirely different animules. Windows Forms operate in a nice little
persistent sandbox on a local machine. ASP.Net WebForms are HTML pages on
the client, and .Net assemblies on the server. IOW, you are limited on the
client to what is available in an HTML document.

Now, your requirments are fuzzy as you've stated them, although I'm sure
they're clear as a bell to you. But different people will understand the
phrase "read in a text file from a selected path" in different ways. So, how
about telling us in more common geek terms, or more descriptive language
what you're trying to do? For example, do you want to make text files on the
server available for reading to the client users? If not, what exactly do
you want?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"B Garrett" <bg*****@twacs.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi,
I have a .ASPX page using C# and I need to read in a text file from a
selected path. so in need the file dialog box to allow the user to choose
the path and file that they want to read in.

What command can I use todo this in a .ASPX page, I tried getting it to
use windows that has the file dialog box but cannot get system.window
class to be included in the project.

Thanks,
B Garrett

Nov 19 '05 #2
if the file is client side, then use <input type=file>, if server side,
write a directory browser page.

-- bruce (sqlwork.com)
"B Garrett" <bg*****@twacs.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I have a .ASPX page using C# and I need to read in a text file from a
selected path. so in need the file dialog box to allow the user to choose
the path and file that they want to read in.

What command can I use todo this in a .ASPX page, I tried getting it to
use windows that has the file dialog box but cannot get system.window
class to be included in the project.

Thanks,
B Garrett

Nov 19 '05 #3
You should use the File control located on the HTML tab of your Visual
Studio toolbox.

Here's more info:
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"B Garrett" <bg*****@twacs.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I have a .ASPX page using C# and I need to read in a text file from a
selected path. so in need the file dialog box to allow the user to choose
the path and file that they want to read in.

What command can I use todo this in a .ASPX page, I tried getting it to
use windows that has the file dialog box but cannot get system.window
class to be included in the project.

Thanks,
B Garrett

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
2
by: B Garrett | last post by:
Hi, I have a .ASPX page using C# and I need to read in a text file from a selected path. so in need the file dialog box to allow the user to choose the path and file that they want to read in. ...
2
by: Susan Baker | last post by:
Hi, I am (trying) to compile some code I downloaded from the internet. The sources contain references to header files - using the form : #include <pathname/file> If I change the form to...
2
by: John Spiegel | last post by:
Hi all, How does one allow a user to download a file WITH selecting where it should be downloaded to on their machine? Also, when using the WebClient.Download method, will the destination path...
0
by: brian.fairchild | last post by:
I have a downloader page in my asp.net application that looks at a session variable to get the path to the file, checks it then downloads it using the Response object. When the "File Download"...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
3
by: spamsink42 | last post by:
hello how do i create a dialog to allow the user to choose a folder? i tried FolderBrowserDialog but encountered a couple of problems: - when you specify the starting location (property...
2
by: mpalomas | last post by:
Hi C++ folks, I have trouble to open files whose path contains non-ascii characters with std::ifstream. For instance let's say i just have a file which has Japanese characters either in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.