// get css from wowslider
// get JS from wowslider
protected void
generate_slider()
{
string paths = Server.MapPath("FolderName");
DirectoryInfo d = new
DirectoryInfo(paths);
FileInfo[] Files = d.GetFiles("*");
HtmlImage img;
HtmlGenericControl li;
foreach (FileInfo
file in Files)
{
string filename = file.Name;//
file name find
string[] str = filename.Split('_');// split with your condtion
if (str[0] == "check
id condition here")
{
li = new HtmlGenericControl("li");
img = new HtmlImage();
img.Src = "Photo Gallery/"
+ filename;
img.Style.Add("min-height:50px;
max-height:250px; min-width", "20%");
img.Alt = "";
img.ID = str[0] + "" +
str[1];
li.Controls.Add(img);
sliderid.Controls.Add(li);
//add
htmlgenericcontrol with server control here 'sliderid= server control id'
}
}
// reference