|
-
Oct 10th, 2006, 02:18 AM
#1
Thread Starter
Just Married
-
Oct 10th, 2006, 03:08 AM
#2
Re: File Dialog
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();
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 10th, 2006, 03:44 AM
#3
Thread Starter
Just Married
Re: File Dialog
 Originally Posted by RobDog888
I assume you want to give the user the
Sir Thanks For reply
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.
-
Oct 10th, 2006, 04:00 AM
#4
Re: File Dialog
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()
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 10th, 2006, 04:16 AM
#5
Thread Starter
Just Married
Re: File Dialog
 Originally Posted by RobDog888
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#
Sir Thanks for reply i will tell you in the evening , after checking the detail...
And trying for it
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|