Click here to Skip to main content
16,005,149 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWhat is wrong with this code? Pin
Kasic Slobodan9-Sep-06 16:39
Kasic Slobodan9-Sep-06 16:39 
AnswerRe: What is wrong with this code? Pin
Guffa9-Sep-06 23:10
Guffa9-Sep-06 23:10 
GeneralRe: What is wrong with this code? Pin
Kasic Slobodan10-Sep-06 2:20
Kasic Slobodan10-Sep-06 2:20 
GeneralRe: What is wrong with this code? Pin
Guffa10-Sep-06 2:31
Guffa10-Sep-06 2:31 
GeneralRe: What is wrong with this code? Pin
Dominic Pettifer10-Sep-06 2:37
Dominic Pettifer10-Sep-06 2:37 
GeneralRe: What is wrong with this code? Pin
Dominic Pettifer10-Sep-06 2:49
Dominic Pettifer10-Sep-06 2:49 
GeneralRe: What is wrong with this code? Pin
Kasic Slobodan10-Sep-06 4:13
Kasic Slobodan10-Sep-06 4:13 
GeneralRe: What is wrong with this code? Pin
Dominic Pettifer10-Sep-06 4:39
Dominic Pettifer10-Sep-06 4:39 
When I write if like: if (GetExcludeFolder().IndexOf(s.Name) == -1)
then all folder that GetExcludeFolder return arent added to array except two.


That should work, maybe want to check the string variable contents, maybe a space or something is being added somewhere it shouldn't, does your IDE (Visual Studio etc) have a debugger?

The only problem with that though is that the GetExcludeFolder() method is being called multiple times, once in each 'foreach' loop depending on how many directories there are. If the 'GetExcludeFolder()' method is fairly resource intensive (reading the file system for instance), the code I gave you using string arrays may be more efficient since 'GetExcludeFolder()' method is only being called once.

Good luck! Smile | :)

Sunday Ironfoot

www.dominicpettifer.co.uk (work in progress)

GeneralRe: What is wrong with this code? Pin
Guffa10-Sep-06 6:25
Guffa10-Sep-06 6:25 
GeneralRe: What is wrong with this code? Pin
Kasic Slobodan10-Sep-06 7:38
Kasic Slobodan10-Sep-06 7:38 
QuestionASP.NET uploading images Pin
Solly749-Sep-06 16:34
Solly749-Sep-06 16:34 
AnswerRe: ASP.NET uploading images Pin
postmaster@programmingknowledge.com9-Sep-06 17:47
postmaster@programmingknowledge.com9-Sep-06 17:47 
AnswerRe: ASP.NET uploading images Pin
Britney S. Morales11-Sep-06 12:18
Britney S. Morales11-Sep-06 12:18 
QuestionAsp.net 2.0 + javascript ...please help Pin
deepaks39-Sep-06 11:47
deepaks39-Sep-06 11:47 
AnswerRe: Asp.net 2.0 + javascript ...please help Pin
Guffa9-Sep-06 12:17
Guffa9-Sep-06 12:17 
Questionproblem regrading IIS(ASP.Net) Pin
Mystic_9-Sep-06 11:13
Mystic_9-Sep-06 11:13 
AnswerRe: problem regrading IIS(ASP.Net) Pin
minhpc_bk10-Sep-06 20:02
minhpc_bk10-Sep-06 20:02 
Questionadding report in report viewer? Pin
honeyman_can9-Sep-06 9:59
honeyman_can9-Sep-06 9:59 
QuestionMARK PLEASE HELP--- get a value in label using javascript in asp.net 2.0 Pin
deepaks39-Sep-06 8:47
deepaks39-Sep-06 8:47 
AnswerRe: MARK PLEASE HELP--- get a value in label using javascript in asp.net 2.0 Pin
Not Active9-Sep-06 9:05
mentorNot Active9-Sep-06 9:05 
GeneralRe: MARK PLEASE HELP--- get a value in label using javascript in asp.net 2.0 Pin
deepaks39-Sep-06 9:14
deepaks39-Sep-06 9:14 
QuestionHelp in ASP.NET 1.1 custom controls Pin
Kariem Soudy9-Sep-06 6:23
Kariem Soudy9-Sep-06 6:23 
AnswerRe: Help in ASP.NET 1.1 custom controls Pin
deepaks39-Sep-06 8:53
deepaks39-Sep-06 8:53 
QuestionPage.Controls.Add() + Response.Write() Pin
NaNg152419-Sep-06 6:17
NaNg152419-Sep-06 6:17 
AnswerRe: Page.Controls.Add() + Response.Write() Pin
Guffa9-Sep-06 9:47
Guffa9-Sep-06 9:47 

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.