my experience – Menon

ASP.Net FileSystem Using GridView

To access directory information, we can use either the “Directory” or the “DirectoryInfo” class; in case if we need to access file information, we have to use either the “File” class or the “FileInfo” class.

To display a directory files in a DataGrid ; we have to assign the string array to the DataSource Property and then call the DataGrid using DataBind() Method. We are using DirectoryInfo for listing directory files, however we can also display other attributes like file size etc…

View Demo

Download Source Code

Comments on: "ASP.Net FileSystem Using GridView" (1)

  1. Perfect, so simple and to the point. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Tag Cloud

Follow

Get every new post delivered to your Inbox.