TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Phaneendra Chakravaram
NA
490
99.4k
how to ignore image in list in c#
Jan 28 2016 11:53 PM
how to ignore image in list in c#
public void bindrepe()
{
string[] filesindirectory = Directory.GetFiles(Server.MapPath("~/images"));
var ss = filesindirectory;
List<String> images = new List<string>(filesindirectory.Count());
images.Remove(Server.MapPath("~/images/blank.gif"));//here i removed image
images.Remove(Server.MapPath("~/images/happy vans logo.png"));//here i removed image
foreach (string item in filesindirectory)
{
images.Add(String.Format("~/images/{0}", System.IO.Path.GetFileName(item)));
}
Image1.ImageUrl = images[2];
RepeaterImages.DataSource = images;
RepeaterImages.DataBind();
}
actually before looping i want to ignore that two images beacue in for loop iam usuing Filesindirectroy so in filedirectroy i want to remove images
Reply
Answers (
3
)
C# ASP.NET APPLICATION
interview question