如何在vb.net中下载时给出图像名称 [英] how to give image name while downloading in vb.net

查看:88
本文介绍了如何在vb.net中下载时给出图像名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...我正在创建一个窗口表单,我已经在该用户中创建了一个下载管理器

将所有URL保存到文本文件中...当用户点击它时,它开始下载..

但问题是它显示图像的名称为0,1,2,3,4,5,6等

所以我想给这个名字是URL的最后一个单词

,例如我的URL是http://www.monsoondata.org/wx/changfs.png

所以我希望它应该显示像changfs.png这样的名字

所以请告诉我该怎么做?

解决方案

  Dim  url  As   String  =   http://www.monsoondata.org/wx/changfs.png 
Dim ArrayURL As String ()= url.Split( / C)
Dim imagename 作为 字符串 = ArrayURL(ArrayURL.Length - 1


hi... i am creating a window form in which i have created a download manager
in this user save all his URL to a text file..and when user clicks on it, it starts downloading..
but the problem is it display the name of image as 0,1,2,3,4,5,6 etc
so i want to give the name as the last word of URL
like for eg if my URL is "http://www.monsoondata.org/wx/changfs.png"
so i want that it should display the name like changfs.png
so plz tell me how should i do this??

解决方案

Dim url As String = "http://www.monsoondata.org/wx/changfs.png"
Dim ArrayURL As String() = url.Split("/"C)
Dim imagename As String = ArrayURL(ArrayURL.Length - 1)


这篇关于如何在vb.net中下载时给出图像名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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