File Open Dialog Box for ASP.NET

onepieceking

Well-known member
Joined
Sep 20, 2006
Messages
64
Programming Experience
1-3
Is it possible to create a file open dialog box for ASP.NET? The files are in the web server. I will parse the contents of the file in the ASP.
 
Code below should give you an idea, use a Listbox (or other list control) to list files in folder, if you need to browse more than one directory of files you populate a Treeview control with them.
VB.NET:
ListBox1.DataSource = New IO.DirectoryInfo(Server.MapPath(".")).GetFiles
ListBox1.DataTextField = "Name"
ListBox1.DataBind()
 
Hi,

I am using showModalDialog to open a aspx page containing the listbox for me to choose the file.

What I need to do now is I need to return the path of the file and the name of the file back to the parent page when the child page is closed. And when the results are back to the parent page, they have to be displayed in listbox. This means that the user can open the child page, select the file, close the child page, append onto listbox in the parent page.

How to append to the listbox in the parent page?
 
Dear John.
Thanks for your help.
I have a trouble but dont know How to solve?
I am using VWD2005 (Visual Web developer) and try to build a website, Inwhich User can choose the xls file in there PC (Cilent Pc) and my site will read and show it's data. I was looking for opendialog file (same in VB.net) but no results.
Are there any way to solve this trouble.? I have read #2, but it only let user get file in server dir (just I think so).
Waiting for your help.
Thank you very much.
 
damxuanthai, just use the FileUpload control on webform.
 
Thank to JohnH.
You mean, firstly We ask user to upload his xls file to our server, then We read this file on our server and show it's data on client browser... I think this way not well (becouse of we have a lot of users at the same time, and may have some trouble, such as some users can post some duplicated file name...).
Are there any way to do this (All task in Client Pc), Mr JohnH.
Waiting for your solution.
Thanks alot.
 
Last edited:
Back
Top