-2

how to search the file and folder seach page

1
  • I get my crystal ball warm and I answer!
    – RageZ
    Nov 12, 2009 at 8:51

1 Answer 1

3

To list Files and Folders you can use something called DirectoryInfo

EXample

void Page_Load(object s, EventArgs e)
{
 DirectoryInfo di = new DirectoryInfo("c:/inetpub/wwwroot/demos");
 FileInfo[] rgFiles = di.GetFiles("*.aspx");
 foreach(FileInfo fi in rgFiles)
 {
  Response.Write("<br><a href=" + fi.Name + ">" + fi.Name + "</a>");       
 }
}

example taken from here

Not the answer you're looking for? Browse other questions tagged or ask your own question.