Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2007, 03:18 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default Selecting the path directory

Hi

I'm doing a saving data into a text file. The codes that I have so far done only allows me to state before hand where want it to be. I'd like the user to choose the directory in each they want to save instead of saving directly into that directory I specify. How can I change this piece of codes to allow the user to specify the directory they want to save?
Please help me if I've done wrong in the code. Thank you!

Dim FILENAME as String = Server.MapPath("Output.txt")
Dim objStreamWriter as StreamWriter
objStreamWriter = File.AppendText(FILENAME)

objStreamWriter.WriteLine(data)

objStreamWriter.Close()
 
Old October 8th, 2007, 10:22 PM
Authorized User
 
Join Date: Jan 2007
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default

I think You can use following:

1) Using HMTL Browse contol of u can get path.
2) Make a DLL to select path as in Desktop Application file directory browsing control and use it in ur application.

2nd one is recomended. There might be othere ways to solve this problem which u can explore.

Regards







Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 04:57 AM
Finding user's home directory path bluckcuck Excel VBA 3 July 18th, 2005 09:23 AM
Fixing virtual directory root path issue seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 10th, 2004 10:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.