Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to open the network folder using below code. i am getting URI Formats not supported.

How to solve this problem. or Do we have any other way to open the network folder..

pls. help
HTML
Error : URI formats are not supported. 
network path is : \\USTANG\Proj1

Code :
VB
Dim newpath As String = "file:" & path
Dim dirInfo As New System.IO.DirectoryInfo(newpath)
GridView1.DataSource = dirInfo.GetDirectories
GridView1.DataBind()
Posted
Updated 30-Sep-12 22:53pm
v2

1 solution

Hi gani,

NetWork Path Should give like Below:

string Path = "~/USTANG/Proj1"; or
string Path =@"/USTANG/Proj1";

Code:
<pre lang="vb">Dim newpath As String = &quot;file:&quot; &amp; path
Dim dirInfo As New System.IO.DirectoryInfo(newpath)
GridView1.DataSource = dirInfo.GetDirectories
GridView1.DataBind()</pre>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900