Click here to Skip to main content
15,887,214 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: C# Pin
Richard MacCutchan12-Apr-14 22:04
mveRichard MacCutchan12-Apr-14 22:04 
Questionxcopy is failing when directory is not found Pin
indian14311-Apr-14 6:55
indian14311-Apr-14 6:55 
AnswerRe: xcopy is failing when directory is not found Pin
Richard Andrew x6412-Apr-14 15:18
professionalRichard Andrew x6412-Apr-14 15:18 
GeneralRe: xcopy is failing when directory is not found Pin
indian14314-Apr-14 7:39
indian14314-Apr-14 7:39 
AnswerRe: xcopy is failing when directory is not found Pin
Richard Andrew x6414-Apr-14 15:33
professionalRichard Andrew x6414-Apr-14 15:33 
GeneralRe: xcopy is failing when directory is not found Pin
indian14316-Apr-14 10:20
indian14316-Apr-14 10:20 
GeneralRe: xcopy is failing when directory is not found Pin
Richard Andrew x6416-Apr-14 10:25
professionalRichard Andrew x6416-Apr-14 10:25 
Questionsearch function C# Pin
Tumtum2111-Apr-14 4:29
Tumtum2111-Apr-14 4:29 
hey guys

I want to create a search function that searches for files with in a folder that matches the text that a textbox holds , how do i got about this

my code below looks for all the files and put it in a gridview but dont know how to make it so that it looks for a match betwwen the textbox and the files within the folder and only displays those
C#
DataTable Dt = new DataTable();
Dt.Columns.Add("File", typeof(string));
Dt.Columns.Add("Size", typeof(string));
Dt.Columns.Add("Dir", typeof(string));
foreach (string filename in Directory.GetFiles(@"C:\files"))
{
    FileInfo fileinfo = new FileInfo(filename);
    Dt.Rows.Add(fileinfo.Name, fileinfo.Length +"KB", fileinfo.FullName);


}
GridView1.DataSource = Dt;
GridView1.DataBind();


PLease help Thanks
AnswerRe: search function C# Pin
Richard Andrew x6414-Apr-14 15:38
professionalRichard Andrew x6414-Apr-14 15:38 
QuestionRollback DB changes through the UI - requesting advice Pin
pmcm11-Apr-14 1:40
pmcm11-Apr-14 1:40 
AnswerRe: Rollback DB changes through the UI - requesting advice Pin
Marco Bertschi11-Apr-14 2:28
protectorMarco Bertschi11-Apr-14 2:28 
QuestionNeed a solution for my problem Pin
indian14310-Apr-14 10:30
indian14310-Apr-14 10:30 
AnswerRe: Need a solution for my problem Pin
Nico Haegens10-Apr-14 22:50
professionalNico Haegens10-Apr-14 22:50 
GeneralRe: Need a solution for my problem Pin
indian14311-Apr-14 6:36
indian14311-Apr-14 6:36 
GeneralRe: Need a solution for my problem Pin
Nico Haegens11-Apr-14 7:28
professionalNico Haegens11-Apr-14 7:28 
GeneralRe: Need a solution for my problem Pin
indian14311-Apr-14 13:27
indian14311-Apr-14 13:27 
GeneralRe: Need a solution for my problem Pin
Nico Haegens12-Apr-14 14:11
professionalNico Haegens12-Apr-14 14:11 
GeneralRe: Need a solution for my problem Pin
indian14313-Apr-14 20:09
indian14313-Apr-14 20:09 
GeneralRe: Need a solution for my problem Pin
indian14314-Apr-14 6:01
indian14314-Apr-14 6:01 
GeneralRe: Need a solution for my problem Pin
Nico Haegens14-Apr-14 11:56
professionalNico Haegens14-Apr-14 11:56 
Questionapply styles in excel with Openxml Pin
byka10-Apr-14 6:18
byka10-Apr-14 6:18 
QuestionConverting aspx pages into ascx pages Pin
indian1439-Apr-14 14:08
indian1439-Apr-14 14:08 
AnswerRe: Converting aspx pages into ascx pages Pin
Blikkies9-Apr-14 22:55
professionalBlikkies9-Apr-14 22:55 
GeneralRe: Converting aspx pages into ascx pages Pin
indian14310-Apr-14 6:08
indian14310-Apr-14 6:08 
GeneralRe: Converting aspx pages into ascx pages Pin
Blikkies10-Apr-14 23:25
professionalBlikkies10-Apr-14 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.