Hi all :wave:
can any one please tell me
How to use open file dialog on web page, code in c#, What is the code, :confused:
Thanks
Printable View
Hi all :wave:
can any one please tell me
How to use open file dialog on web page, code in c#, What is the code, :confused:
Thanks
I assume you want to give the user the option of downloading a file to their system via the save as dialog?
VB Code:
Response.Clear(); Response.AppendHeader("content-disposition", "attachment; filename=document1.doc"); Response.ContentType = "text/plain"; Response.WriteFile(Server.MapPath("document1.doc")); Response.Flush(); Response.End();
Quote:
Originally Posted by RobDog888
Sir Thanks For reply :thumb:
I want the code to see the drive of the computer and the folder in the computer where the website is running. Just like the directory list box and the Drive control in the VB, where we see the entire directory on that PC, and the entire directory. :wave:
You will need to bind a fileinfo object to your datalist's datasource property to list files on the server. This is VB as I am still weak in C#
VB Code:
Dim dirInfo As New DirectoryInfo(Server.MapPath("C:\")) Dim fInfos As FileInfo() = dirInfo.GetFiles("*.*") DataList1.DataSource = fInfos DataList1.DataBind()
Sir Thanks for reply i will tell you in the evening , after checking the detail...Quote:
Originally Posted by RobDog888
And trying for it :thumb:
Thanks