Ecbruck told me I could do the following which worked great. Now I'm trying to figure out how I can compare what's in allFolders with data entered in a textbox.
So, allFolders will contain something like Folder1,Folder2
So then if the user enters something like Folder2 in the NewUploadFolderTextBox.Text I want to compare this with the contents of allFolders. Then what I'm going to do is say that if there's a match, don't insert the folder into the UploadFolder_TBL, otherwise if there's no match, insert the new folder in the UploadFolder_TBL. How would I compare though what's in the allFoldersArray to the text in the NewUploadFolderTextBox.
Thanks Again!
ecbruck:
Yes, use String.Join like this:
System.Collections.Generic.List<string> folders = new System.Collections.Generic.List<string>(); foreach (DataRow dr in myDs1.Tables["UploadFolder"].Rows) { folders.Add(dr["UploadFolderName"].ToString()); } string allFolders = String.Join(",", folders.ToArray());
Source Click Here.
No comments:
Post a Comment
Post your comments here: