script
// Home page Banner
var mygallery2 = new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [484, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
/*imagearray: [
["images/slideshow1.jpg", "", "", ""],
["images/slideshow2.jpg", "", "", ""],
["images/slideshow3.jpg", "", "", ""],],*/
<%=Session["FadeShow"] %>
displaymode: { type: 'auto', pause: 3000, cycles: 0, wraparound: false },
persist: false,
fadeduration: 1000,
descreveal: "always",
togglerid: ""
})
design
<div id="slide">
<div id="fadeshow1" style="z-index: 0">
</div>
</div>
Code Behind
Session["FadeShow"] = "";
string test = "";
//string Single_quotes = @"";
string Double_quotes = @"""";
//Image1.ImageUrl = dt_Banner.Rows[0]["Banner_Path"].ToString();
if (dt_Banner.Rows.Count > 0)
{
Session["FadeShow"] += "imagearray: [";
test += "imagearray: [";
for (int i = 0; i < dt_Banner.Rows.Count; i++)
{
Session["FadeShow"] += "[" + Double_quotes + dt_Banner.Rows[i]["Banner_Path"].ToString().Replace("~/", "") + Double_quotes + "," + Double_quotes + Double_quotes + "," + Double_quotes + Double_quotes + "," + Double_quotes + Double_quotes + "],";
test += "[" + Double_quotes + dt_Banner.Rows[i]["Banner_Path"].ToString().Replace("~/", "") + Double_quotes + "," + Double_quotes + Double_quotes + "," + Double_quotes + Double_quotes + "," + Double_quotes + Double_quotes + "],";
}
test += "],";
Session["FadeShow"] += "],";
}