Thank you for posting at Dotnetfunda [Administrator]
Imports System.IO Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' We'll read all files from Images subfolder Dim diFiles As DirectoryInfo = New DirectoryInfo(Server.MapPath("~/Images/")) ' Takes all .gif images, ' You can set some other filter or ' *.* for all files lstFiles.DataSource = diFiles.GetFiles("*.gif") ' bind data to list box lstFiles.DataBind() End Sub End Class
Login to post response