Dim strVideo As String= String.Empty

'I have a folder named assets in my website. e.g. "http://www.example.com/assets"

strVideo = "~\assets"
strVideo = Server.MapPath(strVideo)
Dim strValue() As String = Directory.GetFiles(strVideo)
For index As Integer = 0 To strValue.Length - 1
      dropdownlist1.Items.Add(strValue(index).Substring(strValue(index).LastIndexOf("\") + 1))
Next

0 comments:

Post a Comment