不支持URI格式 [英] URI formats not supported

查看:237
本文介绍了不支持URI格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下代码打开网络文件夹.我正在获取不支持的URI格式.

如何解决这个问题呢.或还有其他方法可以打开网络文件夹吗?.

请帮助

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

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


代码:


Code :

Dim newpath As String = "file:" & path
Dim dirInfo As New System.IO.DirectoryInfo(newpath)
GridView1.DataSource = dirInfo.GetDirectories
GridView1.DataBind()

推荐答案

加尼,

网络路径应如下所示:

字符串路径=〜/USTANG/Proj1";或
字符串Path = @"/USTANG/Proj1" ;;

代码:
< pre lang ="vb">将newpath设置为String =&"file:&" & amp;路径
Dim dirInfo作为新System.IO.DirectoryInfo(newpath)
GridView1.DataSource = dirInfo.GetDirectories
GridView1.DataBind()</pre>
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>


这篇关于不支持URI格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆